I have this C# code:
string x = "0x0000000000000000000000000000000000000000000000056bc75e2d63100000";
new System.ComponentModel.Int128Converter().ConvertFromString(x).Dump();
It works in my .NET 8 project. I cannot use it in my .NET Standard 2.0 Xamarin Forms project. What is the equivalent?
>Solution :
Your question doesn’t make sense, it’s not about what function to use, it’s about the fact that there is no Int128 type in .Net Standard 2.0. Even if you wrote your own parsing function, there wouldn’t be a type to smush it into.
So you either use it as a string (for example, to display), or use BigInteger to use it in arithmetical operations, albeit at a very large performance penalty.