[Obsolete("GetOption is obsolete. Use the GetOptions() method.")]public RepeatedField<T> GetOption<T>(RepeatedExtension<EnumValueOptions, T> extension)
Gets a repeated value enum value option for this descriptor
The EnumValueOptions, defined in descriptor.proto.
If the options message is not present (i.e. there are no options), null is returned.
Custom options can be retrieved as extensions of the returned message.
NOTE: A defensive copy is created each time this property is retrieved.
Returns a clone of the underlying EnumValueDescriptorProto describing this enum value.
Note that a copy is taken every time this method is called, so clients using it frequently
(and not modifying it) may want to cache the returned value.
[[["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\u003eEnumValueDescriptor\u003c/code\u003e class represents a single enum value within a .proto file's enum definition.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from \u003ccode\u003eDescriptorBase\u003c/code\u003e and implements the \u003ccode\u003eIDescriptor\u003c/code\u003e interface, providing fundamental descriptor properties such as \u003ccode\u003eIndex\u003c/code\u003e, \u003ccode\u003eFullName\u003c/code\u003e, and \u003ccode\u003eFile\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt exposes properties like \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eNumber\u003c/code\u003e, and \u003ccode\u003eEnumDescriptor\u003c/code\u003e to access the name, associated number, and the parent enum descriptor of the value.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods like \u003ccode\u003eGetOptions()\u003c/code\u003e and \u003ccode\u003eToProto()\u003c/code\u003e to access enum value options and a protobuf representation of the enum value descriptor, respectively.\u003c/p\u003e\n"],["\u003cp\u003eIt also has \u003ccode\u003eGetOption<T>\u003c/code\u003e methods, however they are marked as obsolete and should not be used, \u003ccode\u003eGetOptions()\u003c/code\u003e is the new way to retrieve this information.\u003c/p\u003e\n"]]],[],null,["# Class EnumValueDescriptor (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumValueDescriptor)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.EnumValueDescriptor)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.EnumValueDescriptor) \n\n public sealed class EnumValueDescriptor : DescriptorBase, IDescriptor\n\nDescriptor for a single enum value within an enum in a .proto file. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e [DescriptorBase](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase) \\\u003e EnumValueDescriptor \n\nImplements\n----------\n\n[IDescriptor](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.IDescriptor) \n\nInherited Members\n-----------------\n\n[DescriptorBase.Index](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Index) \n[DescriptorBase.FullName](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_FullName) \n[DescriptorBase.File](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_File) \n[DescriptorBase.Declaration](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Declaration) \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### CustomOptions\n\n [Obsolete(\"CustomOptions are obsolete. Use the GetOptions() method.\")]\n public CustomOptions CustomOptions { get; }\n\nThe (possibly empty) set of custom options for this enum value.\n\n### EnumDescriptor\n\n public EnumDescriptor EnumDescriptor { get; }\n\nReturns the enum descriptor that this value is part of.\n\n### Name\n\n public override string Name { get; }\n\nReturns the name of the enum value described by this object.\n\n**Overrides** \n[DescriptorBase.Name](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorBase#Google_Protobuf_Reflection_DescriptorBase_Name)\n\n### Number\n\n public int Number { get; }\n\nReturns the number associated with this enum value.\n\nMethods\n-------\n\n### GetOption\\\u003cT\\\u003e(Extension\\\u003cEnumValueOptions, T\\\u003e)\n\n [Obsolete(\"GetOption is obsolete. Use the GetOptions() method.\")]\n public T GetOption\u003cT\u003e(Extension\u003cEnumValueOptions, T\u003e extension)\n\nGets a single value enum value option for this descriptor\n\n### GetOption\\\u003cT\\\u003e(RepeatedExtension\\\u003cEnumValueOptions, T\\\u003e)\n\n [Obsolete(\"GetOption is obsolete. Use the GetOptions() method.\")]\n public RepeatedField\u003cT\u003e GetOption\u003cT\u003e(RepeatedExtension\u003cEnumValueOptions, T\u003e extension)\n\nGets a repeated value enum value option for this descriptor\n\n### GetOptions()\n\n public EnumValueOptions GetOptions()\n\nThe `EnumValueOptions`, defined in `descriptor.proto`.\nIf the options message is not present (i.e. there are no options), `null` is returned.\nCustom options can be retrieved as extensions of the returned message.\nNOTE: A defensive copy is created each time this property is retrieved.\n\n### ToProto()\n\n public EnumValueDescriptorProto ToProto()\n\nReturns a clone of the underlying [EnumValueDescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.EnumValueDescriptorProto) describing this enum value.\nNote that a copy is taken every time this method is called, so clients using it frequently\n(and not modifying it) may want to cache the returned value."]]