This is for turning an integer to its string representation using the comma as thousand separator:
int value = 1000;
string representation = value.ToString("#,0");
And this is to get an integer value from a string using comma as thousand separator:
string representation = "1,000";
int value = int.Parse(representation, NumberStyles.AllowThousands);
int value;
if (int.TryParse(representation, NumberStyles.AllowThousands, CultureInfo.InvariantCulture , out value)
{
}
else
{
}