本文整理汇总了VB.NET中System.Reflection.MethodBase.IsPublic属性的典型用法代码示例。如果您正苦于以下问题:VB.NET MethodBase.IsPublic属性的具体用法?VB.NET MethodBase.IsPublic怎么用?VB.NET MethodBase.IsPublic使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。
在下文中一共展示了MethodBase.IsPublic属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: methodbase1
Class methodbase1
Public Shared Function Main() As Integer
Console.WriteLine(ControlChars.Cr + "Reflection.MethodBase")
'Get the MethodBase of a method.
'Get the type
Dim MyType As Type = Type.GetType("System.MulticastDelegate")
'Get and display the method
Dim Mymethodbase As MethodBase = _
MyType.GetMethod("RemoveImpl", BindingFlags.NonPublic)
Console.Write(ControlChars.Cr _
+ "Mymethodbase = " + Mymethodbase.ToString())
Dim Myispublic As Boolean = Mymethodbase.IsPublic
If Myispublic Then
Console.Write(ControlChars.Cr _
+ "Mymethodbase is a public method")
Else
Console.Write(ControlChars.Cr _
+ "Mymethodbase is not a public method")
End If
Return 0
End Function
End Class
' Produces the following output
'
' Reflection.MethodBase
' Mymethodbase = System.Delegate RemoveImpl (System.Delegate)
' Mymethodbase is not a public method