This documentation is archived and is not being maintained.

Module.GetFields Method

Returns an array of fields implemented by a class.

[Visual Basic]
Public Function GetFields() As FieldInfo()
public FieldInfo[] GetFields();
public: FieldInfo* GetFields() [];
public function GetFields() : FieldInfo[];

Return Value

An array of type FieldInfo containing the fields implemented by a class, or a null reference (Nothing in Visual Basic) if the fields do not exist.


The GetFields method does not return fields in a particular order, such as alphabetical or declaration order. Your code must not depend on the order in which fields are returned, because that order can vary.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Common Language Infrastructure (CLI) Standard

See Also

Module Class | Module Members | System.Reflection Namespace