Why is Chr(130) a comma (,) in Visual Basic 6 but in C# (char)130 is not? (Im not sure what it is, but definitely not a comma!)
Why is Chr(130) a comma (,) in Visual Basic 6 but in C# (char)130
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Vb Function Chr() is by sure different from the result of casting the integer value 130 to char. To obtain the same result in c# you can set a reference to Microsoft.VisualBasic in your c# and call Microsoft.Visualbasic.Chr(130).
http://msdn.microsoft.com/en-us/library/613dxh46(v=vs.80).aspx
You can also study any of the options exposed in the link below and see the which returns the value you desire.
Int to Char in C#