UtilReflectionGetAllFields(Object, Boolean, BindingFlags) Method
Gets all the fields declared in the specified object.
Namespace: DevCase.Core.Diagnostics.Assembly.ReflectionAssembly: 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(
Object obj,
bool includeBaseTypes,
BindingFlags bindingFlags = BindingFlags.DeclaredOnly|BindingFlags.Instance|BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic
)
Public Shared Function GetAllFields (
obj As Object,
includeBaseTypes As Boolean,
Optional bindingFlags As BindingFlags = BindingFlags.DeclaredOnly Or BindingFlags.Instance Or BindingFlags.Static Or BindingFlags.Public Or BindingFlags.NonPublic
) As IEnumerable(Of FieldInfo)
Dim obj As Object
Dim includeBaseTypes As Boolean
Dim bindingFlags As BindingFlags
Dim returnValue As IEnumerable(Of FieldInfo)
returnValue = UtilReflection.GetAllFields(obj,
includeBaseTypes, bindingFlags)
public:
static IEnumerable<FieldInfo^>^ GetAllFields(
Object^ obj,
bool includeBaseTypes,
BindingFlags bindingFlags = BindingFlags::DeclaredOnly|BindingFlags::Instance|BindingFlags::Static|BindingFlags::Public|BindingFlags::NonPublic
)
static member GetAllFields :
obj : Object *
includeBaseTypes : bool *
?bindingFlags : BindingFlags
(* Defaults:
let _bindingFlags = defaultArg bindingFlags BindingFlags.DeclaredOnly|BindingFlags.Instance|BindingFlags.Static|BindingFlags.Public|BindingFlags.NonPublic
*)
-> IEnumerable<FieldInfo>
No code example is currently available or this language may not be supported.
- obj Object
-
The source object from which to retrieve the fields.
- 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.
IEnumerableFieldInfo
A
IEnumerableT collection with all the fields found.
This is a code example.
No code example is currently available or this language may not be supported.
Dim fields As IEnumerable(Of FieldInfo) = GetAllFields(Me, includeBaseTypes:=True)
For Each field As FieldInfo In fields
Console.WriteLine(field.Name)
Next field
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.