Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Type.MemberType Property

Gets a bitmask indicating the member type.

[Visual Basic]
Overrides Public ReadOnly Property MemberType As MemberTypes
[C#]
public override MemberTypes MemberType {get;}
[C++]
public: __property MemberTypes get_MemberType();
[JScript]
public override function get MemberType() : MemberTypes;

Property Value

A MemberTypes bitmask indicating the member type, which can be one of the following: Constructor, Event, Field, Method, Property, TypeInfo, Custom, NestedType or All.

Example

The following code example shows the MemberType field as a parameter to the GetMember method:

[Visual Basic] 
Dim others As MemberInfo() = t.GetMember(mi.Name, mi.MemberType, _
BindingFlags.Public Or BindingFlags.Static Or BindingFlags.NonPublic _
Or BindingFlags.Instance)

[C#] 
MemberInfo[] others = t.GetMember(mi.Name, mi.MemberType, BindingFlags.Public |
BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance);

[C++] 
MemberInfo* others[] = t->GetMember(mi->Name, mi->MemberType, static_cast<BindingFlags>(
   BindingFlags::Public | BindingFlags::Static | BindingFlags::NonPublic | BindingFlags::Instance));

[JScript] 
var others : MemberInfo[] = t.GetMember(mi.Name, mi.MemberType, BindingFlags.Public |
BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Instance);

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Type Class | Type Members | System Namespace | MemberTypes

Show:
© 2017 Microsoft