static void Main(string[] args) { First_class f1 = new First_class(); First_class f2 = new First_class("Hello world"); f1.write_hello(); f1.write_hello(); f1.write_property(); f2.write_property(); f1.SetFieldValue("Hello fields"); f1.write_hello(); int a; try { do { Console.ForegroundColor = ConsoleColor.White; Console.WriteLine("Please, fill in the number") } } }
static void Main(string[] args) { var o = new First_class(); Console.Writeline(First_class.variable_1); Console.Writeline(o.variable_2); Console.Writeline(o.variable_3); // Error: variable_3 is private }
static void First_Class() { Console.WriteLine("First class"); First_class cl = new First_class(); cl.write_hello(); Fin_write(); }
static void Main(string[] args) { var obj1 = new First_class(); Console.WriteLine(obj1.variable_1); Console.WriteLine(obj1.variable_2); var obj2 = new Second_class(); Console.WriteLine(obj2.varaible_8); }