|
-
July 16th, 2003, 07:01 AM
#1
Type.GetType doesn't work
Hi all,
I want to display property of the controls in the listbox.
But the following code which I got from an example in MSDN doesn't work properly.
On line 1 if I use "System.String" it is working but for
"System.Windows.Forms.TextBox" it doesn't return any type. So MyType is having an undefined value. On line 2 it gives error like "Object reference not set to Object" because MyType has undefined value.
1 > Type MyType = Type.GetType( "System.Windows.Forms.TextBox") ;
2 > MemberInfo[] Mymemberinfoarray = MyType.GetMembers();
why this??
Thanks,
Ashish Sheth
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|