本文整理匯總了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