This class is used internally and by generated code; it is not particularly
expected to be used from application code, although nothing prevents it
from being used that way.
Methods
CheckNotNull<T>(T, string)
public static T CheckNotNull<T>(T value, string name) where T : class
Throws an ArgumentNullException if the given value is null, otherwise
return the value to the caller.
[[["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\u003e\u003ccode\u003eProtoPreconditions\u003c/code\u003e is a static class containing helper methods for managing exceptions when preconditions are not met.\u003c/p\u003e\n"],["\u003cp\u003eThis class is intended for internal use and by generated code, but is accessible for application code if necessary.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eProtoPreconditions\u003c/code\u003e inherits from the \u003ccode\u003eobject\u003c/code\u003e class and includes inherited members like \u003ccode\u003eEquals\u003c/code\u003e, \u003ccode\u003eGetHashCode\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCheckNotNull<T>(T value, string name)\u003c/code\u003e method is a core functionality, throwing an \u003ccode\u003eArgumentNullException\u003c/code\u003e if the given value is null.\u003c/p\u003e\n"],["\u003cp\u003eIt's located in the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace within the \u003ccode\u003eGoogle.Protobuf.dll\u003c/code\u003e assembly, and documentation is provided for version 3.23.0, with links to versions 3.27.1 and 3.15.8.\u003c/p\u003e\n"]]],[],null,[]]