public sealed class Extension<TTarget, TValue> : Extension where TTarget : IExtendableMessage<TTarget>
Represents a type-safe extension identifier used for getting and setting single extension values in IExtendableMessage<T> instances.
This API is experimental and subject to change.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe latest version of the \u003ccode\u003eExtension<TTarget, TValue>\u003c/code\u003e class is 3.27.1, which is used as a type-safe extension identifier for getting and setting single extension values in \u003ccode\u003eIExtendableMessage<T>\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThis API is designated as experimental and is subject to future modifications or changes.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExtension<TTarget, TValue>\u003c/code\u003e class inherits from the \u003ccode\u003eExtension\u003c/code\u003e class and ultimately from the \u003ccode\u003eobject\u003c/code\u003e class, inheriting methods like \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eIt is within the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace and part of the \u003ccode\u003eGoogle.Protobuf.dll\u003c/code\u003e assembly, with type parameters \u003ccode\u003eTTarget\u003c/code\u003e defining the message type and \u003ccode\u003eTValue\u003c/code\u003e defining the field value type.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExtension\u003c/code\u003e class has a constructor \u003ccode\u003eExtension(int fieldNumber, FieldCodec<TValue> codec)\u003c/code\u003e for creating a new extension identifier using a specified field number and codec.\u003c/p\u003e\n"]]],[],null,[]]