public static void seperator(TextBox s)
{
if (!string.IsNullOrEmpty(s.Text))
{
try
{
System.Globalization.CultureInfo culture = new System.Globalization.CultureInfo("en-US");
Int64 valueBefore = Int64.Parse(s.Text, System.Globalization.NumberStyles.AllowThousands);
s.Text = String.Format(culture, "{0:N0}", valueBefore);
s.Select(s.Text.Length, 0);
}
catch (Exception)
{ }
}
}