C# Convert Char to Int
Once again I decided to make a new task from LeetCode and finally my process had been stopped. I could not convert Char to Int. I even spent some time for research, but I could not find any solution. Then I open the documentation and started to read.
So, in the class System there is a struct called Char. And there's a method GetNumericValue(char c).
As you could understand, it's easy to use it.
int dig = (int)Char.GetNumericValue(digit);
To use it more correct to avoid error I recommend to use this code:
if (Char.IsDigit(digit))
{
dig = (int)Char.GetNumericValue(digit);
}
Net 10.0 is not available for Azure Functions. How to fix
Custom Label with multiple styles in TextField of Fluent UI
First impressions after using the new SPFX 1.22.2 with Heft