{"record":{"id":"521add1996a3be94","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-eleventh","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'eleventh')","messagePattern":"Value cannot be null\\. \\(Parameter 'eleventh'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs","lineNumber":1565,"sourceCode":"                throw new ArgumentNullException(nameof(second));\n            if (third == null)\n                throw new ArgumentNullException(nameof(third));\n            if (fourth == null)\n                throw new ArgumentNullException(nameof(fourth));\n            if (fifth == null)\n                throw new ArgumentNullException(nameof(fifth));\n            if (sixth == null)\n                throw new ArgumentNullException(nameof(sixth));\n            if (seventh == null)\n                throw new ArgumentNullException(nameof(seventh));\n            if (eighth == null)\n                throw new ArgumentNullException(nameof(eighth));\n            if (ninth == null)\n                throw new ArgumentNullException(nameof(ninth));\n            if (tenth == null)\n                throw new ArgumentNullException(nameof(tenth));\n            if (eleventh == null)\n                throw new ArgumentNullException(nameof(eleventh));\n\n            return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence of tuple values whenever any of the observable sequences produces an element.\n        /// </summary>\n        /// <typeparam name=\"TFirst\">The type of the elements in the first source sequence.</typeparam>\n        /// <typeparam name=\"TSecond\">The type of the elements in the second source sequence.</typeparam>\n        /// <typeparam name=\"TThird\">The type of the elements in the third source sequence.</typeparam>\n        /// <typeparam name=\"TFourth\">The type of the elements in the fourth source sequence.</typeparam>\n        /// <typeparam name=\"TFifth\">The type of the elements in the fifth source sequence.</typeparam>\n        /// <typeparam name=\"TSixth\">The type of the elements in the sixth source sequence.</typeparam>\n        /// <typeparam name=\"TSeventh\">The type of the elements in the seventh source sequence.</typeparam>\n        /// <typeparam name=\"TEighth\">The type of the elements in the eighth source sequence.</typeparam>\n        /// <typeparam name=\"TNinth\">The type of the elements in the ninth source sequence.</typeparam>\n        /// <typeparam name=\"TTenth\">The type of the elements in the tenth source sequence.</typeparam>\n        /// <typeparam name=\"TEleventh\">The type of the elements in the eleventh source sequence.</typeparam>","sourceCodeStart":1547,"sourceCodeEnd":1583,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs#L1547-L1583","documentation":"The 11-source CombineLatest overload validates each of its arguments and throws ArgumentNullException when the eleventh observable sequence is null. This is a synchronous, fail-fast guard in the public API: the check runs before the implementation object is created. Rx throws rather than silently ignoring a missing source because CombineLatest's output contract depends on all inputs.","triggerScenarios":"Calling Observable.CombineLatest(first, ..., tenth, eleventh) with the eleventh argument null — typically a misassigned variable, a failed factory call, or a conditional that left the last source unassigned.","commonSituations":"Passing the result of a method that can return null (e.g. FindSequence) directly into the last argument slot; copy-paste of an overload call where the last argument was not updated; dynamic query builders that skip constructing the final source.","solutions":["Assign a valid IObservable<T> instance to the eleventh argument before the call","Replace a possibly-null source with Observable.Empty<T>() or Observable.Never<T>()","Trace the null back to its assignment site with a debugger or null-state analysis (nullable reference types)","Add pre-call validation that names the missing source in your own error message"],"exampleFix":"// before\nvar combined = Observable.CombineLatest(a, b, c, d, e, f, g, h, i, j, maybeEleventh);\n// after\nif (maybeEleventh == null) throw new InvalidOperationException(\"eleventh source not configured\");\nvar combined = Observable.CombineLatest(a, b, c, d, e, f, g, h, i, j, maybeEleventh);","handlingStrategy":"validation","validationCode":"if (eleventh == null) throw new ArgumentNullException(nameof(eleventh)); // or: eleventh ??= Observable.Empty<T>();","typeGuard":"static bool IsValidSource<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try { var combined = Observable.CombineLatest(a, b, c, d, e, f, g, h, i, j, k); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"eleventh\") { log.Error(\"eleventh source was null\"); throw; }","preventionTips":["Use Observable.Empty/Never instead of null for absent streams","Check nullable-reference-type warnings at the call site","Fail early with your own named guard when assembling sources dynamically","Avoid copy-pasting overload calls without verifying every argument is assigned"],"tags":["csharp","rx","argument-null","combinelatest"],"backgroundTag":"null-argument","analyzedSha":"94b5d5ab912789f5abe9a72138a25bbd716fe59c","analyzedAt":"2026-09-15T02:26:24.759Z","contentChangedAt":"2026-09-15T02:26:24.759Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}