NUlid
NUlid copied to clipboard
1.7.0 return error with generated Ulid
Hello!
First, thanks for your job!
When using the latest version 1.7.0 of NUlid, we have this error when generate and then parse NUlid code
Example with this : "01FTX9NB2FVWG9MYN7ZEE03HX0"
'new Ulid("01FTX9NB2FVWG9MYN7ZEE03HX0")' threw an exception of type 'System.ArgumentOutOfRangeException' ActualValue: null Data: {System.Collections.ListDictionaryInternal} HResult: -2146233086 HelpLink: null InnerException: null Message: "Index and length must refer to a location within the string.\r\nParameter name: length" ParamName: "length" Source: "mscorlib" StackTrace: " at System.String.Substring(Int32 startIndex, Int32 length)\r\n at NUlid.Ulid.Parse(String s)\r\n at NUlid.Ulid..ctor(String ulid)" TargetSite: {System.String Substring(Int32, Int32)}
We are using framework .NET 4.7.1 project
Thanks for your help !
Could you please try 1.5.0 and let me know if that works for you? I tried the ULID you showed and it seems to work for me?
Maybe @cyrusdargahi has a clue what could be going on?
Hello,
Sorry for the late response
Yes, we had to downgrade version 1.5.0 to make things works.
Thank you for your help
I think I fixed this here:
https://github.com/RobThree/NUlid/pull/19
Thanks. See dfe70d0ce2d89c0eeb824476c45438b15659fbba