1
위임 변수가 주어진다면 가능한지 알고 싶습니다. 실제로 개체 메서드를 가리키고 있는지 확인하고 싶습니다. 이 객체와 메소드의 이름을 가져옵니다.대리자가 개체의 메서드인지 확인하고이 개체 참조 및 메서드 이름을 검색하십시오.
는 예컨대 :
는public delegate void test();
public static test testDel = null;
public void TestMethod()
{
;
}
public void TestDelegate()
{
//here it is not a method of an object
testDel +=() => { };
// here it is "TestMethod"
testDel += this.TestMethod;
// i want something like that:
SomeDelegateInfoClass[] infos = testDel.GetAssignedObjectsAndMethodNames();
}
은, 대단히 감사합니다 ^^. –