private string QuoteIfNeeded(string text) { if (text.ToCharArray().Intersect(" \t".ToCharArray()).Any()) { return "\"" + text + "\""; } return text; }