c# - Comma escape in stringbuilder -
    here's simple issue i'm running into, knowledge limited. have program turns existing database csv; however, many of fields contain commas , need them escape. i've tried couple of things no avail (under objecttocsvdata), included snippet appreciated.   using system; using system.collections.generic; using system.linq; using system.text; using system.collections; using system.reflection;  namespace ofasort { public static class utility {     public static string collectiontocsv(ilist collection)     {         stringbuilder sb = new stringbuilder();              (int index = 0; index < collection.count; index++)             {             object item = collection[index];              if (index == 0)             {                 sb.append(objecttocsvheader(item));             }             sb.append(objecttocsvdata(item));             sb.append(environment.newline);         }          return sb.tostring();     }      public static string objecttocsvdata(object obj)     {...