TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
None
NA
2
0
Is it possible to instantiate a parameterized Generic
Jun 19 2008 8:50 AM
Hi,
I was wondering if it possible to instantiate a parameterized Generic eg
public T GetListViewData<T>() where T : AbstractOrganizationalUnit, new()
{
return new T(this.OrganizationalUnitId, DateTime.Now));
}
first I tried it having the AbstractOrganizationalUnit-class abstract. Then I modified it to public. AbstractOrganizationalUnit has a constructor which actually takes this signature and so do all child classes of AbstractOrganizationalUnit.
Any idea how to approach that???
thanks in advance antoschka
Reply
Answers (
1
)
Using multiple lists in a single 'foreach'
String.empty v.s. string.null