本文整理汇总了VB.NET中System.Reflection.EventInfo.IsMulticast属性的典型用法代码示例。如果您正苦于以下问题:VB.NET EventInfo.IsMulticast属性的具体用法?VB.NET EventInfo.IsMulticast怎么用?VB.NET EventInfo.IsMulticast使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类System.Reflection.EventInfo
的用法示例。
在下文中一共展示了EventInfo.IsMulticast属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: MainClass
' 导入命名空间
Imports System.Reflection
Public Class MainClass
Public Shared Sub Main()
Dim Book = New Derived()
Dim Member As MemberInfo
Console.WriteLine("Members:")
For Each Member In Book.GetType.GetMembers()
Console.WriteLine(Member.Name & " " & Member.MemberType)
Next
Dim PropertyObj As PropertyInfo
Console.WriteLine("Properties:")
For Each PropertyObj In Book.GetType.GetProperties()
Console.WriteLine(PropertyObj.Name & " " & PropertyObj.PropertyType.ToString())
Next
Dim MethodObj As MethodInfo
Console.WriteLine("Methods:")
For Each MethodObj In Book.GetType.GetMethods()
Console.WriteLine(MethodObj.Name & " " & MethodObj.ReturnType.ToString())
Next
Dim EventObj As EventInfo
Console.WriteLine("Events:")
For Each EventObj In Book.GetType.GetEvents()
Console.WriteLine(EventObj.Name & " " & EventObj.IsMulticast)
Next
Dim InterfaceObj As Type
Console.WriteLine("Events:")
For Each InterfaceObj In Book.GetType.GetInterfaces()
Console.WriteLine(InterfaceObj.Name)
Next
End Sub
End Class
Class Base
Public ProductID As String
Public Weight As Double
Private ProductPrice As Double
Public Sub New()
End Sub
Public ReadOnly Property Price() As Double
Get
Return 0
End Get
End Property
End Class
Class Derived
Inherits Base
Implements IFormattable
Public Title As String
Public Author As String
Public Publisher As String
Public Overridable Overloads Function ToString(ByVal _
Format As String, ByVal Provider As IFormatProvider) _
As String Implements IFormattable.ToString
ToString = Title
End Function
Public Sub New()
MyBase.New()
End Sub
End Class