خرید بک لینک

Vote count: 0

What is the proper way of check if the type parameter if of type (or derives from) some type X? E.g.

Function MyFunc(Of T As BaseClass)() As T
  If TypeOf T Is GetType(ChildClass1) Then
    'Do something specific to ChildClass1
  End If

  'Do things common to all BaseClass objects
End Function

The above code doesn't compile, with or without TypeOf.

asked 56 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 15 فروردين 1395 ساعت: 14:42

صفحه بندی