So what I am trying to do is concatenate a USPS tracking number into a string. And the final string must have tracking number in quotes. For example, when I print the string it should look like:
<tracking userID=ABC trackingID="910236783468367367346738" deliveryNotification=false>
I have a list of tracking numbers as strings in an array(trackingIDs
) and I am using a loop to create an above string for each tracking id.
string finalString = null;
for(int i = 0; i < trackingIDs.length; i++)
{
finalString = "<tracking userID=ABC trackingID=\"" + trackingIDs[i] + "\" deliveryNotification=false>";
Console.WriteLine(finalString);
}
This code produces:
<tracking userID=ABC trackingID=\"910236783468367367346738\" deliveryNotification=false>
For a smaller number, I could simply convert the number into an integer and everything would look fine. But I think these tracking numbers exceed the capacity of long so a conversion is not plausible. So basically my question is how do I get the "\" slashes to go away in this string ?