Skip to content

The "\" character?

Nick

Asked May 17, 2006, 11:48 AM EDT1 answer
Share
LinkedInX
Hi I am making a program in Visual studio 2005, but I have run in to a problem. The compiler will not accept the following line of code: string[] strsplit = strFileName.Split(new Char[] {'\'}); The compiler will however accept this line of code: string[] strsplit = strFileName.Split(new Char[] {'2'}); So the problem must be the “\” character. Is there anyone who knows how to make the compiler accept this specific character? Nick_L

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Maybe you should use like this: new char[] {'\\'}.
    0