Standard java practise, is to simply write
final int prime = 31;
int result = 1;
for( String s : strings )
{
result = result * prime + s.hashCode();
}
// result is the hashcode.
More Related Contents:
- What is the best algorithm for overriding GetHashCode?
- How do you effectively model inheritance in a database?
- Databinding an enum property to a ComboBox in WPF
- Could not load file or assembly ‘System.Data.SQLite’
- New asp.net charting controls – will they work with MVC (eventually)?
- How to select different app.config for several build configurations
- How do you keep user.config settings across different assembly versions in .net?
- Removing Default dialogs from MSI
- Calling Console.WriteLine from multiple threads
- What’s the difference between EscapeUriString and EscapeDataString?
- Is it necessary to add a @ in front of an SqlParameter name?
- How can I convert ‘System.Windows.Input.Key’ to ‘System.Windows.Forms.Keys’?
- Could not find any resources appropriate for the specified culture or the neutral culture
- Why are circular references considered harmful? [closed]
- Description for event id from source cannot be found
- Why doesn’t await on Task.WhenAll throw an AggregateException?
- Does Mono .NET support and compile C++ / CLI?
- How to map table splitting in EF Code First?
- HRESULT: 0x80131040: The located assembly’s manifest definition does not match the assembly reference
- Why is DataTable faster than DataReader
- How can I create database tables from XSD files?
- What causing this “Invalid length for a Base-64 char array”
- .NET: Are there any differences between InvariantCulture and en-US?
- entity framework Unable to load the specified metadata resource [duplicate]
- Beginning VSTO Development
- ResponseFormat.Json returns xml [duplicate]
- Are nested Try/Catch blocks a bad idea?
- The request was aborted: Could not create SSL/TLS secure channel sandbox account
- Determine whether .NET assemblies were built from the same source
- String.Split VS. Regex.Split?