Connecting Tech Pros Worldwide Forums | Help | Site Map

Can't access to the original object's method

Newbie
 
Join Date: Aug 2008
Posts: 1
#1: Aug 19 '08
Hello
I am creating an user control dynamicly using assembly.CreateInstance method.
The problem is that this method return an object and when I try to call to one of the method in the original user control such as Open(), I got an error number CS1061 that the obkect does not contain a definition for this method!
Thanks.

Lives Here
 
Join Date: Sep 2006
Posts: 12,070
#2: Aug 20 '08

re: Can't access to the original object's method


In which class is that method? You have to type cast that returned object to the class type that contains that method first.
Reply