I have a page that has 3 variables. They look like this:
String[] Headers = new String[] { "Max Width", "Max Length", "Max Height" };
String currentHeader = (String)HttpContext.Current.Request.QueryString["ItemHas"] ?? "";
String checkString = (String)HttpContext.Current.Request.QueryString["ItemIn"] ?? "";
The checkString is a list of Headers delimited by a "|".
What is the easiest way to check if my currentHeader
is in my Headers array and in my checkString String? I can do it but not in less than 20 lines of code. That seems like a less than optimal solution.