Possible Duplicate:
What's the best string concatenation method using C#?
Hi,
I have a code snippet like this where a large content of data is read from a file and check each position for some value and concat a string.
This string concatenation takes large amounts of time and processing power. Is there an approach where I can reduce the execution time?
Important: Reading Content file syntax is incorrect just need to give a idea
string x;
while (var < File.Length)
{
if (File.Content[var] == "A")
{
x += 1;
}
else
{
x += 0;
}
var++;
}