troubleshooting Question

Working with quotation marks ( " ).

Avatar of Mr_Fulano
Mr_FulanoFlag for United States of America asked on
.NET ProgrammingVisual Basic.NET
5 Comments2 Solutions449 ViewsLast Modified:
Hi, I have a textbox where I'm checking each character looking for a few different things. In one of my lines of code I compare the current character (strChar) to a list of punctuation characters and if strChar is contained in that list, then I found a punctuation of some sort.

Everything worked OK, until I got to the quotation mark ( " ) . Every time I add a quotation mark to my string of punctuation characters, it thinks I'm ending the string. -- Obviously!

My list of punctuations is as follows:

Dim strMiscChars as String =  " ! @ # $ % ^ & * ( ) _ + = - ` , . / < > ? ; ' : [ ] \ { } | "

If strMiscChars.Contains(strChar) Then
   Do something, because I found a punctuation of some sort...
EndIf

How could I include the quotation mark within a string list surrounded by quotes?

I recall that in Java I was able to do that, by using the slash symbol, but I'm not sure if that translates to VB.NET 2005.

Thanks,
Fulano
ASKER CERTIFIED SOLUTION
appari

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 5 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros