Indicates whether the field in the specified message is set.
For proto3 fields that aren't explicitly optional, this throws an InvalidOperationException
Repeated fields are mutated by fetching the value and manipulating it as a list.
Map fields are mutated by fetching the value and manipulating it as a dictionary.
[[["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\u003eIFieldAccessor\u003c/code\u003e interface allows for reflective access to fields within the Google.Protobuf library, found in the \u003ccode\u003eGoogle.Protobuf.Reflection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eIFieldAccessor\u003c/code\u003e provides methods to clear, get, and set field values within an \u003ccode\u003eIMessage\u003c/code\u003e, handling both single and repeated or map-type field values.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eDescriptor\u003c/code\u003e property within \u003ccode\u003eIFieldAccessor\u003c/code\u003e returns the \u003ccode\u003eFieldDescriptor\u003c/code\u003e associated with the current field, providing metadata about that field.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eHasValue\u003c/code\u003e method checks if a field is set in a message, but it throws an \u003ccode\u003eInvalidOperationException\u003c/code\u003e for proto3 fields that are not explicitly optional.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eSetValue\u003c/code\u003e method is limited to modifying singular, simple fields, and for repeated or map fields you must fetch and then modify the value as a list or dictionary.\u003c/p\u003e\n"]]],[],null,["# Interface IFieldAccessor (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.IFieldAccessor)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.IFieldAccessor)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.IFieldAccessor) \n\n public interface IFieldAccessor\n\nAllows fields to be reflectively accessed.\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### Descriptor\n\n FieldDescriptor Descriptor { get; }\n\nReturns the descriptor associated with this field.\n\nMethods\n-------\n\n### Clear(IMessage)\n\n void Clear(IMessage message)\n\nClears the field in the specified message. (For repeated fields,\nthis clears the list.)\n\n### GetValue(IMessage)\n\n object GetValue(IMessage message)\n\nFetches the field value. For repeated values, this will be an\n[IList](https://learn.microsoft.com/dotnet/api/system.collections.ilist) implementation. For map values, this will be an\n[IDictionary](https://learn.microsoft.com/dotnet/api/system.collections.idictionary) implementation.\n\n### HasValue(IMessage)\n\n bool HasValue(IMessage message)\n\nIndicates whether the field in the specified message is set.\nFor proto3 fields that aren't explicitly optional, this throws an [InvalidOperationException](https://learn.microsoft.com/dotnet/api/system.invalidoperationexception)\n\n### SetValue(IMessage, object)\n\n void SetValue(IMessage message, object value)\n\nMutator for single \"simple\" fields only.\n\n**Remarks** \nRepeated fields are mutated by fetching the value and manipulating it as a list.\nMap fields are mutated by fetching the value and manipulating it as a dictionary."]]