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