SyntaxFix
Write A Post
Hire A Developer
Questions
This is now possible with C# 7.0's pattern matching. For example:
var myString = "abcDEF"; switch(myString) { case string x when x.StartsWith("abc"): //Do something here break; }