Hi, I'm trying to write some lines of code using a switch statment to see if certain characters are in a string. Is it possible to do this?
I tried this:
but obviously that doesn't work. So is there a way to accomplish this via switch statment?Code:switch (directoryPath.Contains) { case ":": //some code break; case "\\": //some code break; case "?": //some code break; default: //some code break;
Thanks.




Reply With Quote