force-net / Crc32.NET

Fast version of Crc32 algorithm for .NET
MIT License
199 stars 52 forks source link

Incorrect usage of ArgumentOutOfRangeException #5

Closed uecasm closed 6 years ago

uecasm commented 7 years ago

https://github.com/force-net/Crc32.NET/blob/699351a2a3ac9ac1cdadb1e16d4285e35f44fedd/Crc32.NET/Crc32CAlgorithm.cs#L53

The default constructor should be used instead (remove the parameter).

This text is the default message for the ArgumentOutOfRangeException and so should not be specified. Also, the one-string constructor is not a message-based constructor, it takes the parameter name, so this is not correct usage.