System.Reflection.BindingFlags Enum

public enum BindingFlags

Base Types

Object
  ValueType
    Enum
      BindingFlags

Assembly

mscorlib

Library

Reflection

Summary

Specifies flags that control the binding and the invocation processes conducted by reflection.

Description

This enumeration is used by reflection classes such as Binder, Module, and ConstructorInfo . BindingFlags values are used to control binding in methods in classes that find and invoke, create, get, and set members and types.

To specify multiple BindingFlags values, use the bitwise 'OR' operator.

Attributes

FlagsAttribute

See Also

System.Reflection Namespace

Members

BindingFlags Fields

BindingFlags.CreateInstance Field
BindingFlags.DeclaredOnly Field
BindingFlags.ExactBinding Field
BindingFlags.GetField Field
BindingFlags.GetProperty Field
BindingFlags.IgnoreCase Field
BindingFlags.Instance Field
BindingFlags.InvokeMethod Field
BindingFlags.NonPublic Field
BindingFlags.OptionalParamBinding Field
BindingFlags.Public Field
BindingFlags.SetField Field
BindingFlags.SetProperty Field
BindingFlags.Static Field
BindingFlags.SuppressChangeType Field
BindingFlags.value__ Field


BindingFlags.CreateInstance Field

CreateInstance = 0x200;

Summary

Specifies that an instance of a type will be created.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.DeclaredOnly Field

DeclaredOnly = 0x2;

Summary

Specifies that only the members declared on a type will be searched when binding. When this field is specified, inherited members will not be searched.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.ExactBinding Field

ExactBinding = 0x10000;

Summary

Specifies that, when binding to a method, the types of the arguments passed to the binder are required to be the same as the types of the corresponding parameters in the method signature.

[Note: Custom binders are allowed to ignore this flag. This flag is provided as a hint for custom binders.]

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.GetField Field

GetField = 0x400;

Summary

Specifies that the value of a field will be returned.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.GetProperty Field

GetProperty = 0x1000;

Summary

Specifies that the value of a property will be returned by invoking the get accessor of a PropertyInfo instance that reflects that property.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.IgnoreCase Field

IgnoreCase = 0x1;

Summary

Specifies that a member name will be handled in a case-insensitive manner when binding.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.Instance Field

Instance = 0x4;

Summary

Specifies that instance members will be included in the binding search.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.InvokeMethod Field

InvokeMethod = 0x100;

Summary

Specifies that a method will be invoked.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.NonPublic Field

NonPublic = 0x20;

Summary

Specifies that non-public (i.e. family and private) members will be included in the binding search if the search has the permission required to bind non-public members.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.OptionalParamBinding Field

OptionalParamBinding = 0x40000;

Summary

Specifies that the set of members whose parameter count matches the number of arguments supplied to the binding method are to be returned by the binding method. [Note: This flag is used in conjunction with methods that have parameters with default values and with methods that have variable arguments. ]

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.Public Field

Public = 0x10;

Summary

Specifies that public members will be included in the binding search.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.SetField Field

SetField = 0x800;

Summary

Specifies that the value of a field will be set.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.SetProperty Field

SetProperty = 0x2000;

Summary

Specifies that the value of a property will be set by invoking the set accessor of a PropertyInfo instance that reflects that property.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.Static Field

Static = 0x8;

Summary

Specifies that static members will be included in the binding search.

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.SuppressChangeType Field

SuppressChangeType = 0x20000;

Summary

Specifies that the system will not change the types of parameters when binding with the default binder.

[Note: Custom binders are allowed to ignore this flag. This flag is provided as a hint for custom binders.]

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace

BindingFlags.value__ Field

value__;

See Also

System.Reflection.BindingFlags Enum, System.Reflection Namespace