How can I implement a “imaginative” and “aesthetically pleasing” short string hash algorithm in C#?
This method accepts a shorter string (1-100 characters) as a parameter and returns a ushort integer value:
Why do C# class libraries prefer int over uint in their design?
In programming, there are many places where I feel that uint should be used, but libraries use int instead. I have a hard time coming up with multiple examples of this right now, but it’s just a feeling. In many cases, the sign is not important, and in many algorithms, it’s not even needed. That means half of the integers are wasted! I feel heartbroken by such a waste.