interface ISource

    {

        string GetString();

    }

    class Source : ISource

    {

        public string GetString()

        {

            return "인터페이스 콜백";

        }

        public void Test()

        {

            Target target = new Target();

            target.Do(this);

        }

    }

    class Target

    {

        public void Do(ISource obj)

        {

            Console.WriteLine(obj.GetString());

        }

    }


Source 인스턴스 만들고 Test 메서드 호출하게 되면 진행되는 순서가

1 : Source 을 Target의 Do의 매개변수로 넘긴다

2 : Target에서 매개변수로 받는건 인터페이스이지만, this 를 넘겨주었고 그 this 는 인터페이스를 상속받았으니 해당 인터페이스가 정의했던 메서드를 this에서 찾아서 실행한다


이거임? 머리아파서 설명 잘 했는지도 몰겠음 알아서 알아들어ㅕ줘