genericmethodparameter2.vb
来自「大名鼎鼎的mono是.NET平台的跨平台(支持linux」· VB 代码 · 共 34 行
VB
34 行
Imports SystemImports System.CollectionsImports System.ReflectionNamespace GenericMethodParameter2 Class ConstructorDeclaration Shared Function Main() As Integer End Function End Class Class Base(Of T) Inherits Generic.List(Of T) End Class Class Derived Inherits Base(Of Object) Function GetSpecificMembers(Of T)() As Generic.List(Of T) Dim result As New Generic.List(Of T) For Each obj As Object In Me If TypeOf obj Is T Then result.Add(CType(CObj(obj), T)) End If Next Return result End Function End ClassEnd Namespace
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?