Name
PropertyInfo
Synopsis
This class implements MemberInfo
and represents
a declared property on a type. CanRead
and CanWrite
check whether
this property has get
or set
behaviors defined. These methods can be inspected directly (as MethodInfo
instances)
by calling GetGetMethod()
and GetSetMethod()
, or
together by calling GetAccessors()
,
which returns an array of all defined accessors. If the property is
an indexer, GetIndexParameters()
returns parameters to access the indexer. GetValue()
and SetValue()
allow
the instance of this property to be set or retrieved; these act as a
shortcut to calling Invoke
on
the methods returned
from GetGetMethod()
or GetSetMethod()
.
Public MustInherit Class PropertyInfo : Inherits MemberInfo ' Protected Constructors Protected Sub New() ' Public Instance Properties MustInherit Public ReadOnly Property Attributes As PropertyAttributes MustInherit Public ReadOnly Property CanRead As Boolean MustInherit Public ReadOnly Property CanWrite As Boolean Public ReadOnly Property IsSpecialName As Boolean Overrides Public ReadOnly Property MemberType As MemberTypes MustInherit Public ReadOnly Property PropertyType As Type ' Public Instance Methods Public Function GetAccessors() As MethodInfo() MustInherit Public Function GetAccessors( ByVal nonPublic As Boolean) As MethodInfo() Public Function GetGetMethod() As MethodInfo MustInherit Public Function GetGetMethod( ByVal nonPublic As Boolean) As MethodInfo MustInherit Public Function GetIndexParameters( ) As ParameterInfo() ...
Get VB.NET Core Classes in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.