title: how to put the value from a datatable in double quotes
body: <p>I have a data table DT with 3 column col1,col2,col3.</p>
  
  <p>I wrote the below code</p>
  
  <pre><code>Boolean fst = true;
                string q = Convert.ToString('"');
                foreach (DataColumn co in DT.Columns)
                {   
  
                      if (fst)
                          {
                            colname = colname + q + co.ColumnName+q  ;
                            fst = false;
                            }
                            else
                            colname = colname +","+ q+co.ColumnName+q ;
  
                 }
  </code></pre>
  
  <p>the output that I want to get is colname= "col1","col2","col3"</p>
  
  <p>but am getting an output  colname="\"col1\",\"col2\",\"col3\"</p>
  
  <p>how can I get the desired output ? any pointers please....</p>
  
  <p>along with this I have a datatable DT with 4 column col1,col2,col3,col4.</p>
  
  <p>str = String.Format("{0,-30}{0,-30}{0,-30}{0,-30}", "Col1", "Col2", "Col3", "Col4");</p>
  
  <p>if we write str to a file it will generate the output </p>
  
  <pre><code>Heloo                         Heloo                         Heloo                         Heloo 
  </code></pre>
  
  <p>I need to do it programatically</p>
  
  <pre><code>       string str="";
      Boolean fst = true;
               string q = Convert.ToString('"');
      string frmt="";
                foreach (DataColumn co in DT.Columns)
                {   
  
                      if (fst)
                          {
                            colname = colname + q + co.ColumnName+q  ;
                            fst = false;
                            }
                            else
                            colname = colname +","+ q+co.ColumnName+q ;
  
          frmt = frmt +"{0,-30}";
  
                 }
  
    str= String.Format(frmt, colname);
  </code></pre>
  
  <p>here value of frmt="{0,-30}{0,-30}{0,-30}";
  value of colname="Col1", "Col2", "Col3", "Col4";</p>
  
  <p>But if I write str to file it gives bad output. Any pointers on how to achive it ?</p>