Blank Variable

Hello. I have a string that is from an external txt and the user is supposed to have put something there. Is there any way for me to say:
If the string doesn't have any value (the user hasn't put anything in the txt file), do this. If it does, so this.
1
2
3
string number ;
if (number = "")
{}

number = "" doesn't compile.
Thanks!
That should compile, but it doesn't do what you want. You very likely meant to use == for comparison instead of = for assignment.
Oh thanks Zhuge. I made a stupid mistake and only put one = and didn't realize it. Thanks.
Topic archived. No new replies allowed.