How do I check for null or empty string for many arguments? - C#
问题 I have the below method, which I need to check for whether the arguments are empty or null. public DB Where(string field, string operat, string value, string andOr, string field2, string operat2, string value2) { _Where = " WHERE " + field + " " + operat + " @" + field + "1 " + andOr + " " + field2 + " " + operat2 + " @" + field2 + "2 "; _Params.Add(field + "1", value); _Params.Add(field2 + "2", value2); return this; } I have found the string.IsNullOrWhiteSpace method however this would