Programming2007
Programmer
I want to say search for either string *.htm and *.aspx. But the parameter needs to be a string not a boolean expression which is (*.htm && *.aspx). I get the error message ... Operator '|' cannot be applied to operands of type 'string' and 'string'. How do I allow my string parameter to be a boolean expression evaluating which string should be the parameter???
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",(strFileTypes));
leads to error Operator '|' cannot be applied to operands of type 'string' and 'string'.
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",("*.htm"));
works for all htm files
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",("*.aspx));
works for all aspx files
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",(strFileTypes));
leads to error Operator '|' cannot be applied to operands of type 'string' and 'string'.
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",("*.htm"));
works for all htm files
strFileTypes = ("*.htm" && "*.aspx")
string [] s = Directory.GetFiles("C:\\SCoutline4\\",("*.aspx));
works for all aspx files