Home > database >  How to convert "Convert.ToUInt32(char value)" of C# to Java
How to convert "Convert.ToUInt32(char value)" of C# to Java

Time:11-01

I need to convert Convert.ToUInt32(char value) code to java. this function return uint value in C# same implementation i need for java.

I have done bit google work but didnt get expected output.

CodePudding user response:

I think what you are looking for is either Character.getNumericValue(char value) OR (int) char value

CodePudding user response:

Java doesn't have a type equivalent to UInt. The C# function Convert.ToUInt32(char value) converts the Unicode value of its argument to a UInt32. The closest you can get to that in Java is (int) value. This will give you the value converted from char to int and will always be a positive value.

  • Related