public string ToString_IsCorrect_WithCulture(string format, string culture) { CultureInfo cultureInfo = new CultureInfo(culture); CustomerLib.Customer customer = new CustomerLib.Customer("Jeffrey Richter", 1234567, "+1 (425) 555-0100"); return(customer.ToString(format, cultureInfo)); }
static void Main(string[] args) { //Calculator calc = new Calculator(); //Console.WriteLine(calc.GetMsg()); //Console.WriteLine(calc.AddNumbers(100,200)); CustomerLib.Customer customer = new CustomerLib.Customer(); customer.StoreDetails(1001, "David", "Italy"); customer.DisplayDetails(); //CalculatorLib.Customer c2 = new CalculatorLib.Customer(); //Customer c = new Customer(); //conversion of data-types //Console.WriteLine(Convert.ToInt32(12.8)); //Console.WriteLine(int.Parse("12")); //Console.WriteLine(double.Parse("12.8")); //Console.WriteLine(int.Parse("12.9")); //Console.WriteLine(int.TryParse("12",out int res)); //Console.WriteLine(res); //address : country,state,pin, streetno, hno Address adr1 = new Address("India", "Karnataka", "560042"); //adr1.State = "Karnataka"; //adr1.Country = "India"; //adr1.pin = "560042"; adr1.Display(); //Address adr2 = adr1; //adr2.pin = "560054"; //Console.WriteLine("Pin:" + adr1.pin); }
public string ToString_IsCorrect(string format) { CustomerLib.Customer customer = new CustomerLib.Customer("Jeffrey Richter", 1234567, "+1 (425) 555-0100"); return(customer.ToString(format)); }