• using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    namespace ConsoleApplication1
    {
    class Program
    {
    static void Main(string[] args)
    {
    Peregruzka test1 = new Peregruzka();
    Peregruzka test2 = new Peregruzka();
    Peregruzka test3 = new Peregruzka();
    test1.method();
    test2.method("Hello");
    test3.method("Hello", "_World");
    Console.WriteLine("Вызов методов: 1){0} 2){1} 3){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();
    }
    }

    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;
    }
    }

    Указывает ошибку в строке
    public string method()
    {
    return s = param1;
    }

    Требуется класс делегат

Ответы 0

  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years