Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
declare Genric type via reflection
harshil oh
Sep 20 2010 7:18 AM
5.7k
Reply
hi,
i like to know about how to instantiate generic object with reflection
pls find my example,
I want to create an Object of "hello" with generic type "ClassABC"
//want to Create hello object,with generic type will declare at run time only
public void DoHello(String ClassName)
{
Type TypeClassABC= Type.GetType(ClassName);
hello _hello= new hello<TypeClassABC>();
}
But get a build error:
the type or namespace "TypeClassABC" could not be found,
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
disabling popup blocker using javascript
Which microsoft certification I should go for?