using System;
using System.Globalization;
class SamplesNumberFormatInfo {
public static void Main() {
NumberFormatInfo myNfi = new NumberFormatInfo();
Int64 myInt = 123456789012345;
Console.WriteLine( "Default :{0}", myInt.ToString( "N", myNfi ) );
myNfi.NumberGroupSizes = new int[] { 2, 4, 0 };
Console.WriteLine( "Grouping ( {0} ):{1}",PrintArraySet( myNfi.NumberGroupSizes ), myInt.ToString( "N", myNfi ) );
}
public static string PrintArraySet( int[] myArr ) {
string myStr = null;
myStr = myArr[0].ToString();
for ( int i = 1; i < myArr.Length; i++ )
myStr += ", " + myArr[i].ToString();
return( myStr );
}
}
//Default :123,456,789,012,345.00
//Grouping ( 2, 4, 0 ):123456789,0123,45.00