J
James
Hello,
I tried to pass a delegate object to a function, it works fine if the
access modifier is private but gives me a compile error when the
access modifier of the function is public. Can anyone explain why ?
ex:
class
{
delegate int testdelegate(int temp) ;
public void testfunction1(testdelegate test, int temp) //gives
errror
{ }
private void testfunction2(testdelegate test,int temp) //works fine
{ }
static void Main()
{ }
}
Thanks,
James.
I tried to pass a delegate object to a function, it works fine if the
access modifier is private but gives me a compile error when the
access modifier of the function is public. Can anyone explain why ?
ex:
class
{
delegate int testdelegate(int temp) ;
public void testfunction1(testdelegate test, int temp) //gives
errror
{ }
private void testfunction2(testdelegate test,int temp) //works fine
{ }
static void Main()
{ }
}
Thanks,
James.