How probable is a hash collision of two strings in C#? I know that for objects in general, two unequal object are not guaranteed to have unequal hash codes, but how does this behave when the objects are strings.
I specifically need a function from a URL string to a unique key, but don't need anything fancy, its just to cache stuff from the web, skip download if a certain URL was already loaded.
Edit
What if I define a function like this
string UniqueKey (string url) {
var list = SplitStringInHalf (url);
var firstHalf = list[0].GetHashCode();
var secondHalf = list[1].GetHashCode();
return firstHalf.ToString() + secondHalf.ToString();
}