{"record":{"id":"2bdcae667dc4567d","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-sixteenth","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'sixteenth')","messagePattern":"Value cannot be null\\. \\(Parameter 'sixteenth'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs","lineNumber":1900,"sourceCode":"                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            if (twelfth == null)\n                throw new ArgumentNullException(nameof(twelfth));\n            if (thirteenth == null)\n                throw new ArgumentNullException(nameof(thirteenth));\n            if (fourteenth == null)\n                throw new ArgumentNullException(nameof(fourteenth));\n            if (fifteenth == null)\n                throw new ArgumentNullException(nameof(fifteenth));\n            if (sixteenth == null)\n                throw new ArgumentNullException(nameof(sixteenth));\n\n            return s_impl.CombineLatest(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth, sixteenth);\n        }\n\n    }\n}\n","sourceCodeStart":1882,"sourceCodeEnd":1907,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.CombineLatest.cs#L1882-L1907","documentation":"The public Observable.CombineLatest 16-source overload throws ArgumentNullException when the sixteenth (last) source sequence is null. This is the final null check in the validation chain before delegating to the internal implementation. Pass a real IObservable for the sixteenth argument.","triggerScenarios":"Calling Observable.CombineLatest(first..sixteenth, resultSelector) with null passed as the sixteenth observable argument.","commonSituations":"A conditionally-created last observable left null; copy-paste of an overload call with too few sources; a helper returning null instead of an empty observable.","solutions":["Ensure a valid non-null IObservable is supplied as the sixteenth argument.","Replace null with Observable.Empty<T>() or Observable.Never<T>() when a source is intentionally absent.","Pre-validate all 16 observables for null before the call."],"exampleFix":"// before\nObservable.CombineLatest(s1, ..., s15, lastSource /* null */, selector);\n// after\nvar sixteenth = lastSource ?? Observable.Empty<LastType>();\nObservable.CombineLatest(s1, ..., s15, sixteenth, selector);","handlingStrategy":"validation","validationCode":"if (sixteenth == null) throw new InvalidOperationException(\"sixteenth source must be provided\");","typeGuard":"bool IsValid<T>(IObservable<T> s) => s is not null;","tryCatchPattern":"try { return Observable.CombineLatest(s1, /* ... */, s15, s16, selector); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"sixteenth\") { /* fix wiring or fall back */ }","preventionTips":["Treat IObservable parameters as non-nullable by convention; annotate with [NotNull] or C# nullable reference types","Prefer Observable.Never<T>() for 'wait forever' semantics instead of null","Cover combinator wiring with unit tests that subscribe immediately to catch eager validation"],"tags":["null-argument","reactive-extensions","combinelatest","argument-validation"],"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"}