Export (0) Print
Expand All
Expand Minimize

IMetaDataImport::EnumMethodSemantics Method

Enumerates the properties and the property-change events to which the specified method is related.

HRESULT EnumMethodSemantics (
   [in, out] HCORENUM    *phEnum,
   [in]  mdMethodDef     mb, 
   [out] mdToken         rEventProp[],
   [in]  ULONG           cMax,
   [out] ULONG           *pcEventProp
);

phEnum

[in, out] A pointer to the enumerator. This must be NULL for the first call of this method.

mb

[in] A MethodDef token that limits the scope of the enumeration.

rEventProp

[out] The array used to store the events or properties.

cMax

[in] The maximum size of the rEventProp array.

pcEventProp

[out] The number of events or properties returned in rEventProp.

HRESULT

Description

S_OK

EnumMethodSemantics returned successfully.

S_FALSE

There are no events or properties to enumerate. In that case, pcEventProp is zero.

Many common language runtime types define PropertyChanged events and OnPropertyChanged methods related to their properties. For example, the System.Windows.Forms.Control type defines a Font property, a FontChanged event, and an OnFontChanged method. The set accessor method of the Font property calls OnFontChanged method, which in turn raises the FontChanged event. You would call EnumMethodSemantics using the MethodDef for OnFontChanged to get references to the Font property and the FontChanged event.

Platforms: See .NET Framework System Requirements.

Header: Cor.h

Library: Included as a resource in MsCorEE.dll

.NET Framework Versions: 4.6 Preview, 4.5.2, 4.5.1, 4.5, 4, 3.5 SP1, 3.5, 3.0 SP1, 3.0, 2.0 SP1, 2.0, 1.1, 1.0

Show:
© 2015 Microsoft