We help IT Professionals succeed at work.

How to embed quotation marks in output file C

rwheeler23
rwheeler23 asked
on
104 Views
Last Modified: 2018-01-18
I am using this to write data to a comma delimited text  file.
tw.WriteLine("{0,1},{1,1},{2,1},{3,1},{4,1},{5,1},{6,1},{7,1},{8,1},{9,1},{10,1}", dr["Arrest_ID"],dr["Incident"],dr["Arrest_Date"],dr["Arrest_Time"],dr["Age"],dr["Sex"],dr["Race"],dr["Ethnic"],dr["Crime_Location"],dr["ESRI_LOCATION"],dr["Law"]);

Now they are requesting that I enclose the text fields in quotation marks. Is it as simple as "{0,1}"?
Comment
Watch Question

Co-Founder and Chief Architect
CERTIFIED EXPERT
Top Expert 2016
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
NorieAnalyst Assistant
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
rwheeler23President

Author

Commented:
Thanks folks. That did the trick.
rwheeler23President

Author

Commented:
Thnaks

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions