I am trying to convert the c# project into vb.net project. But i am not able to convert some code in vb.net.
C# Code:
if ((a >= 33) && (a <= 48)) { word += "|"; word1 += "|"; }
Vb.net Code:
If (Char.GetNumericValue(a) >= 33) AndAlso (Char.GetNumericValue(a) <= 48) Then
word += "|"
word1 += "|"
End If
Here in c# the numeric value of a is directly compared with integer value. But in Vb.net i can't get the numeric value of a to compare with the ASCII value. If there is any possible to convert the c# project solution into vb.net solution? Let me know the solution. Thanks in advance.
Asc(a)?Convert.ToInt32. If you read the documentation forChar.GetNumericValueit should be obvious why that is not what you want.Convert.ToInt32. Thank you.