Identifying Generic Types

kkemerait

Member
Joined
Aug 30, 2008
Messages
10
Location
Underhill, VT
Programming Experience
10+
Is there an alternative way to identify within a generic method the type that was passed in (of T) without having to create a bogus object and check typename?

Public Shared Function Create(Of T)() As iManager(Of T)

Dim BogusVar as T -- don't want to do it this way if possible to avoid

Select Case TypeName(BogusVar)

Case ("iSomeInterface")...


Thanks!
 
GetType(T)
 
wow

ok, I need to go out and mow the grass or something ... not a good day for programming ... I tried everything in the universe but ... the simple solution never occured to me ... feelin kinda foolish now ... thanks for the assist!!

:)
 
Back
Top