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\u003eProtoPreconditions is a static class containing helper methods for exception handling when preconditions are unmet, primarily used internally or by generated code.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes a \u003ccode\u003eCheckNotNull<T>\u003c/code\u003e method that throws an \u003ccode\u003eArgumentNullException\u003c/code\u003e if a given value is null, otherwise returning the value.\u003c/p\u003e\n"],["\u003cp\u003eProtoPreconditions inherits from the base \u003ccode\u003eObject\u003c/code\u003e class and is found within the \u003ccode\u003eGoogle.Protobuf\u003c/code\u003e namespace, within the \u003ccode\u003eGoogle.Protobuf.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version available is 3.27.1, whereas version 3.15.8 is described in the content.\u003c/p\u003e\n"]]],[],null,[]]