Using Double Quote in String

This is a silly question and maybe it is messing me up because it is late in the day, but why is the following code below also putting in the back slashes when I try to use a double quote:C#: \[code\]private List<string> dataList; private int ShowAuditLogForPrimaryID { get; set; } private string xmlString; private DataSet _dataSet; SqlDataReader reader = sqlCommand.ExecuteReader(); dataList = new List<String>(); while (reader.Read()) { for (int i = 0; i < reader.FieldCount; i++) { string rdr = reader.ToString(); dataList.Add(rdr); string Name = reader.GetName(i); xmlString = xmlString + Name + "=" + " " + "\"" + dataList.ToString() + "\"" + " "; Console.WriteLine(xmlString); }\[/code\]It is including the backslashes in the string which is not allowing my xml reader to be able to read it.I appreciate any help. Thanks in advance!
 
Back
Top