[RESOLVED] [2005] dim c as char; if c = " then
I need to know how to compare a character to " in vb.net. I know this is a simple question, but I can't think of how to ask it to a computer (ie search google or the forums).
Basically I have a character that I grab from a string and I need to check if it is a quote, because I need to allow "," within a quote, but not outside a quote.
Thanks in advance.
Re: [2005] dim c as char; if c = " then
I think its a little trivial, but this should do it...
VB Code:
Dim MyChar As Char = """"c ' 1 double quote character
MessageBox.Show(MyChar) 'shows 1 double quote
If MyChar = """" Then
MessageBox.Show("Its it!")
End If
2 Double quotes inside of the quotes would parse into one....
Re: [2005] dim c as char; if c = " then
try this
VB Code:
If Asc(ch) = 34 Then '34 is the ASCII value of '"'
'Do what ever
End If
Re: [2005] dim c as char; if c = " then