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\u003eThis document outlines the \u003ccode\u003eExtension<TTarget, TValue>\u003c/code\u003e class, which serves as a type-safe identifier for managing single extension values within \u003ccode\u003eIExtendableMessage<T>\u003c/code\u003e instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eExtension<TTarget, TValue>\u003c/code\u003e class is considered experimental and may be subject to future changes.\u003c/p\u003e\n"],["\u003cp\u003eIt inherits from the \u003ccode\u003eExtension\u003c/code\u003e class and ultimately the \u003ccode\u003eObject\u003c/code\u003e class, including \u003ccode\u003eExtension.FieldNumber\u003c/code\u003e as an inherited member.\u003c/p\u003e\n"],["\u003cp\u003eThe class constructor, \u003ccode\u003eExtension(int fieldNumber, FieldCodec<TValue> codec)\u003c/code\u003e, allows the creation of a new extension identifier by specifying a field number and codec.\u003c/p\u003e\n"],["\u003cp\u003eThe class is located within the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace and is part of the \u003ccode\u003eGoogle.Protobuf.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,[]]