UtilReflectionGetAllFields(Type, Boolean, BindingFlags) Method

Gets all the fields declared in the specified Type.

Definition

Namespace: DevCase.Core.Diagnostics.Assembly.Reflection
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static IEnumerable<FieldInfo> GetAllFields(
	Type type,
	bool includeBaseTypes,
	BindingFlags bindingFlags = BindingFlags.DeclaredOnly|BindingFlags.Instance|BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic
)

Parameters

type  Type
The source Type.
includeBaseTypes  Boolean
If , the search include fields declared in base types too.
bindingFlags  BindingFlags  (Optional)
Flags that controls binding and the way in which the search for members and types is conducted by Reflection.

Return Value

IEnumerableFieldInfo
A IEnumerableT collection with all the fields found.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also