What is the charCodeAt() equivalent in C#?
string outString="";
for (var i = 0; i < inpString.Length; i++)
{
outString += inpString.charCodeAt(i).toString(); //i need to replaced charCodeAt(i) with equalent c# code
}
How can i do this in C#?
Try out this
string outString="";
for (var i = 0; i < inpString.Length; i++)
{
outString+= ((int)inpString[i]).ToString();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With