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:

Code:
            switch (directoryPath.Contains)
            {
                case ":":
                    //some code
                    break;
                case "\\":
                    //some code
                    break;
                case "?":
                    //some code
                    break;
                default:
                    //some code
                    break;
but obviously that doesn't work. So is there a way to accomplish this via switch statment?

Thanks.