public void TestMethod1() { var intToHexProvider = new IntToHexFormatProvider(); Assert.AreEqual(String.Format(intToHexProvider, "{0:H}", 88), "0x58"); Assert.AreEqual(String.Format(intToHexProvider, "{0:H}", 172), "0xAC"); Assert.AreEqual(String.Format(intToHexProvider, "{0:H}", 489), "0x1E9"); }
static void Main(string[] args) { var c = new Customer("Sai", "+375505", 50); Console.WriteLine(c); Console.WriteLine(String.Format("{0:N}123", c)); var pr = new CustomerFormatProvider(); Console.WriteLine(String.Format(pr, "{0:UN}", c)); Console.WriteLine("-----------------------------------"); var ith = new IntToHexFormatProvider(); Console.WriteLine(String.Format(ith, "{0:H}", 88)); Console.WriteLine("-----------------------------------"); int[] a = { 4, 2, 8 }; // Console.WriteLine(NOD.Euclidian()); }