here are 2 screen shots when i try to debug my code in visual studio 2005


i want to save string value in variable check in variable a but it saves -1 not the actual string which is something like that "<username>admin</username>"
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.
If you want to save the value of
checkina, then your assignment is the wrong way round. Currently it’s converting the value ofato a string, and storing the result incheck.Of course, you haven’t specified the type of
a– it may be converted to a string one way in the debugger, but the actualToStringmethod may be overridden to do something different.If you actually meant to describe the question the other way round, you need to provide a lot more information – a short but complete program to demonstrate the problem would be ideal.
String assignment very definitely works in C# – so the chances are incredibly high that you’re doing something strange in the code that you haven’t shown us.