本文整理汇总了VB.NET中System.Reflection.MethodBase.IsAbstract属性的典型用法代码示例。如果您正苦于以下问题:VB.NET MethodBase.IsAbstract属性的具体用法?VB.NET MethodBase.IsAbstract怎么用?VB.NET MethodBase.IsAbstract使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了MethodBase.IsAbstract属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: methodbase1
' 导入命名空间
Imports System.Reflection
Class methodbase1
Public Shared Function Main() As Integer
Console.WriteLine("Reflection.MethodBase")
Console.WriteLine()
' Get the types.
Dim MyType1 As Type = _
Type.GetType("System.Runtime.Serialization.Formatter")
Dim MyType2 As Type = _
Type.GetType("System.Reflection.MethodBase")
' Get and display the methods
Dim Mymethodbase1 As MethodBase = _
MyType1.GetMethod("WriteInt32", BindingFlags.NonPublic Or BindingFlags.Instance)
Dim Mymethodbase2 As MethodBase = _
MyType2.GetMethod("GetCurrentMethod", BindingFlags.Public Or BindingFlags.Static)
Console.WriteLine("Mymethodbase = {0}", Mymethodbase1.ToString())
If Mymethodbase1.IsAbstract Then
Console.WriteLine(ControlChars.CrLf & "Mymethodbase is an abstract method.")
Else
Console.WriteLine(ControlChars.CrLf & "Mymethodbase is not an abstract method.")
End If
Console.Write("Mymethodbase = {0}", Mymethodbase2.ToString())
If Mymethodbase2.IsAbstract Then
Console.WriteLine(ControlChars.CrLf & "Mymethodbase is an abstract method.")
Else
Console.WriteLine(ControlChars.CrLf & "Mymethodbase is not an abstract method.")
End If
Return 0
End Function
End Class