Reputation: 668
I'm writing a C# program that works with chars and strings.
String str= textbox1.text;
if(str[0]="'")
{
}
How I can use "'" in my if statement?
Regards.
Upvotes: 2
Views: 96
Reputation: 82594
like this, escape '
with \
'\''
and ==
String str= textbox1.text;
if(str[0]=='\'')
{
}
Upvotes: 6