public sealed class DescriptorProto : IMessage<DescriptorProto>, IEquatable<DescriptorProto>, IDeepCloneable<DescriptorProto>, IBufferMessage, IMessage
[[["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\u003e\u003ccode\u003eDescriptorProto\u003c/code\u003e is a class that describes a message type within the Google.Protobuf.Reflection namespace.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits from \u003ccode\u003eobject\u003c/code\u003e and implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt includes various fields such as \u003ccode\u003eEnumTypeFieldNumber\u003c/code\u003e, \u003ccode\u003eExtensionFieldNumber\u003c/code\u003e, and \u003ccode\u003eNameFieldNumber\u003c/code\u003e, each representing a specific aspect of the message type's structure.\u003c/p\u003e\n"],["\u003cp\u003eThe class also provides properties like \u003ccode\u003eName\u003c/code\u003e, \u003ccode\u003eEnumType\u003c/code\u003e, \u003ccode\u003eField\u003c/code\u003e, and \u003ccode\u003eNestedType\u003c/code\u003e, which allow for accessing and manipulating the message type's components, as well as methods such as \u003ccode\u003eClone()\u003c/code\u003e, \u003ccode\u003eEquals()\u003c/code\u003e, and \u003ccode\u003eMergeFrom()\u003c/code\u003e, allowing for the manipulation of the type.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDescriptorProto\u003c/code\u003e supports extension methods for tasks like merging, writing, and converting message data, along with specific methods for calculating message size, and clearing specific data members.\u003c/p\u003e\n"]]],[],null,["# Class DescriptorProto (3.27.1)\n\nVersion latestkeyboard_arrow_down\n\n- [3.27.1 (latest)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto)\n- [3.23.0](/dotnet/docs/reference/Google.Protobuf/3.23.0/Google.Protobuf.Reflection.DescriptorProto)\n- [3.15.8](/dotnet/docs/reference/Google.Protobuf/3.15.8/Google.Protobuf.Reflection.DescriptorProto) \n\n public sealed class DescriptorProto : IMessage\u003cDescriptorProto\u003e, IEquatable\u003cDescriptorProto\u003e, IDeepCloneable\u003cDescriptorProto\u003e, IBufferMessage, IMessage\n\nDescribes a message type. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e DescriptorProto \n\nImplements\n----------\n\n[IMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1)[DescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[DescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto), [IDeepCloneable](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1)[DescriptorProto](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection.DescriptorProto), [IBufferMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage), [IMessage](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage) \n\nInherited Members\n-----------------\n\n[object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) \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\nNamespace\n---------\n\n[Google.Protobuf.Reflection](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.Reflection)\n\nAssembly\n--------\n\nGoogle.Protobuf.dll\n\nConstructors\n------------\n\n### DescriptorProto()\n\n public DescriptorProto()\n\n### DescriptorProto(DescriptorProto)\n\n public DescriptorProto(DescriptorProto other)\n\nFields\n------\n\n### EnumTypeFieldNumber\n\n public const int EnumTypeFieldNumber = 4\n\nField number for the \"enum_type\" field.\n\n### ExtensionFieldNumber\n\n public const int ExtensionFieldNumber = 6\n\nField number for the \"extension\" field.\n\n### ExtensionRangeFieldNumber\n\n public const int ExtensionRangeFieldNumber = 5\n\nField number for the \"extension_range\" field.\n\n### FieldFieldNumber\n\n public const int FieldFieldNumber = 2\n\nField number for the \"field\" field.\n\n### NameFieldNumber\n\n public const int NameFieldNumber = 1\n\nField number for the \"name\" field.\n\n### NestedTypeFieldNumber\n\n public const int NestedTypeFieldNumber = 3\n\nField number for the \"nested_type\" field.\n\n### OneofDeclFieldNumber\n\n public const int OneofDeclFieldNumber = 8\n\nField number for the \"oneof_decl\" field.\n\n### OptionsFieldNumber\n\n public const int OptionsFieldNumber = 7\n\nField number for the \"options\" field.\n\n### ReservedNameFieldNumber\n\n public const int ReservedNameFieldNumber = 10\n\nField number for the \"reserved_name\" field.\n\n### ReservedRangeFieldNumber\n\n public const int ReservedRangeFieldNumber = 9\n\nField number for the \"reserved_range\" field.\n\nProperties\n----------\n\n### Descriptor\n\n public static MessageDescriptor Descriptor { get; }\n\n### EnumType\n\n public RepeatedField\u003cEnumDescriptorProto\u003e EnumType { get; }\n\n### Extension\n\n public RepeatedField\u003cFieldDescriptorProto\u003e Extension { get; }\n\n### ExtensionRange\n\n public RepeatedField\u003cDescriptorProto.Types.ExtensionRange\u003e ExtensionRange { get; }\n\n### Field\n\n public RepeatedField\u003cFieldDescriptorProto\u003e Field { get; }\n\n### HasName\n\n public bool HasName { get; }\n\nGets whether the \"name\" field is set\n\n### Name\n\n public string Name { get; set; }\n\n### NestedType\n\n public RepeatedField\u003cDescriptorProto\u003e NestedType { get; }\n\n### OneofDecl\n\n public RepeatedField\u003cOneofDescriptorProto\u003e OneofDecl { get; }\n\n### Options\n\n public MessageOptions Options { get; set; }\n\n### Parser\n\n public static MessageParser\u003cDescriptorProto\u003e Parser { get; }\n\n### ReservedName\n\n public RepeatedField\u003cstring\u003e ReservedName { get; }\n\nReserved field names, which may not be used by fields in the same message.\nA given name may only be reserved once.\n\n### ReservedRange\n\n public RepeatedField\u003cDescriptorProto.Types.ReservedRange\u003e ReservedRange { get; }\n\nMethods\n-------\n\n### CalculateSize()\n\n public int CalculateSize()\n\nCalculates the size of this message in Protocol Buffer wire format, in bytes.\n\n### ClearName()\n\n public void ClearName()\n\nClears the value of the \"name\" field\n\n### Clone()\n\n public DescriptorProto Clone()\n\nCreates a deep clone of this object.\n\n### Equals(DescriptorProto)\n\n public bool Equals(DescriptorProto other)\n\n### Equals(object)\n\n public override bool Equals(object other)\n\n**Overrides** \n[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object))\n\n### GetHashCode()\n\n public override int GetHashCode()\n\n**Overrides** \n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode)\n\n### MergeFrom(CodedInputStream)\n\n public void MergeFrom(CodedInputStream input)\n\nMerges the data from the specified coded input stream with the current message.\n\n**Remarks** \nSee the user guide for precise merge semantics.\n\n### MergeFrom(DescriptorProto)\n\n public void MergeFrom(DescriptorProto other)\n\nMerges the given message into this one.\n\n**Remarks** \nSee the user guide for precise merge semantics.\n\n### ToString()\n\n public override string ToString()\n\n**Overrides** \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\n### WriteTo(CodedOutputStream)\n\n public void WriteTo(CodedOutputStream output)\n\nWrites the data to the given coded output stream.\n\nExtension Methods\n-----------------\n\n[MessageExtensions.IsInitialized(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_IsInitialized_Google_Protobuf_IMessage_) \n[MessageExtensions.MergeDelimitedFrom(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeDelimitedFrom_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.MergeFrom(IMessage, ByteString)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_Google_Protobuf_ByteString_) \n[MessageExtensions.MergeFrom(IMessage, ReadOnlySequence\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Buffers_ReadOnlySequence_System_Byte__) \n[MessageExtensions.MergeFrom(IMessage, byte\\[\\])](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___) \n[MessageExtensions.MergeFrom(IMessage, byte\\[\\], int, int)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_Byte___System_Int32_System_Int32_) \n[MessageExtensions.MergeFrom(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.MergeFrom(IMessage, ReadOnlySpan\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_MergeFrom_Google_Protobuf_IMessage_System_ReadOnlySpan_System_Byte__) \n[MessageExtensions.ToByteArray(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteArray_Google_Protobuf_IMessage_) \n[MessageExtensions.ToByteString(IMessage)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_ToByteString_Google_Protobuf_IMessage_) \n[MessageExtensions.WriteDelimitedTo(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteDelimitedTo_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.WriteTo(IMessage, IBufferWriter\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Buffers_IBufferWriter_System_Byte__) \n[MessageExtensions.WriteTo(IMessage, Stream)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_IO_Stream_) \n[MessageExtensions.WriteTo(IMessage, Span\\\u003cbyte\\\u003e)](/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.MessageExtensions#Google_Protobuf_MessageExtensions_WriteTo_Google_Protobuf_IMessage_System_Span_System_Byte__)"]]