-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Pravs
Message 1 in Discussion

Hello All,   I am trying to invoke a method in a nested class by reflection 
InvokeMember but its not able to find it. Following is the structure  
using System; 
using System.Collections; 
namespace TestName 
{ 
public class Test 
{ 
public NewSet2  objNewSet2 =null; 
public NewSet1  objNewSet1 =null; 
public Test(string str) 
{ 
switch(str) 
{ 
case "NewSet2": 
{ 
objNewSet2 = new NewSet2(); 
break; 
} 
 
case "NewSet1": 
{ 
objNewSet1 = new NewSet1(); 
break; 
} 
} 
} 
 
public class NewSet2 
{ 
public bool Method 1() 
{  
return false; 
} 
} 
 
public class NewSet1 
{ 
public bool Method2 () 
{ 
return false; 
} 
} 
} 
} 
I need to invoke TestName.Test.NewSet1.Method2() 
Any Thoughts? 
The error returned is Method TestName.Test.NewSet1.Method2 not found if i invoke using 
InvokeMember. 
Thanks!! 
  
     

-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to