Returns the fields in the message as an immutable list, in ascending field number
order. Field numbers need not be contiguous, so there is no direct mapping from the
index in the list to the field number; to retrieve a field by field number, it is better
to use the MessageDescriptor.FieldCollection indexer.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eMessageDescriptor.FieldCollection\u003c/code\u003e class simplifies the process of retrieving field accessors for specific fields within a message.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the base \u003ccode\u003eobject\u003c/code\u003e class and resides within the \u003ccode\u003eGoogle.Protobuf.Reflection\u003c/code\u003e namespace in the \u003ccode\u003eGoogle.Protobuf.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe class allows accessing fields by either their integer number or their string name, returning the \u003ccode\u003eFieldDescriptor\u003c/code\u003e for the specified field, but raising a \u003ccode\u003eKeyNotFoundException\u003c/code\u003e if field doesn't exist.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides methods \u003ccode\u003eInDeclarationOrder()\u003c/code\u003e and \u003ccode\u003eInFieldNumberOrder()\u003c/code\u003e to get an immutable list of \u003ccode\u003eFieldDescriptor\u003c/code\u003e instances, either in declaration order or numerical order.\u003c/p\u003e\n"]]],[],null,["# Class MessageDescriptor.FieldCollection (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.MessageDescriptor.FieldCollection)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.MessageDescriptor.FieldCollection)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.MessageDescriptor.FieldCollection) \n\n public sealed class MessageDescriptor.FieldCollection\n\nA collection to simplify retrieving the field accessor for a particular field. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e MessageDescriptor.FieldCollection \n\nInherited Members\n-----------------\n\n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) \n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Protobuf.Reflection](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection)\n\nAssembly\n--------\n\nGoogle.Protobuf.dll\n\nProperties\n----------\n\n### this\\[int\\]\n\n public FieldDescriptor this[int number] { get; }\n\nRetrieves the descriptor for the field with the given number.\n\n### this\\[string\\]\n\n public FieldDescriptor this[string name] { get; }\n\nRetrieves the descriptor for the field with the given name.\n\nMethods\n-------\n\n### InDeclarationOrder()\n\n public IList\u003cFieldDescriptor\u003e InDeclarationOrder()\n\n### InFieldNumberOrder()\n\n public IList\u003cFieldDescriptor\u003e InFieldNumberOrder()"]]