using System; namespace ConsoleApplication1 { internal class Peregruzka { public string s; public string method() { return s = "Пусто"; } public string method(string param1) { return s = param1; } public string method(string param1, string param2) { return s = param1 + param2; } //public string method() //{ // return s = param1; //} } struct TestStructura { public int x; public string s; } class Program { static void Main() { Peregruzka test1 = new Peregruzka(); Peregruzka test2 = new Peregruzka(); Peregruzka test3 = new Peregruzka(); test1.method(); test2.method("Hello"); test3.method("Hello", "_World"); Console.WriteLine("Вызов методов: \n1){0} \n2){1} \n3){2}", test1.s, test2.s, test3.s); TestStructura structura; structura.x = 999; structura.s = "Structura"; Console.WriteLine("x = {1}, s= {0}", structura.s,structura.x); Console.ReadKey(); } } }