{"record":{"id":"7c5f3ce8cf1a9ecb","repo":"dotnet/reactive","slug":"value-cannot-be-null-parameter-fifteenth-observable-multiple","errorCode":null,"errorMessage":"Value cannot be null. (Parameter 'fifteenth')","messagePattern":"Value cannot be null\\. \\(Parameter 'fifteenth'\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs","lineNumber":1811,"sourceCode":"                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            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\n            return s_impl.Zip(first, second, third, fourth, fifth, sixth, seventh, eighth, ninth, tenth, eleventh, twelfth, thirteenth, fourteenth, fifteenth);\n        }\n\n        /// <summary>\n        /// Merges the specified observable sequences into one observable sequence of tuple values whenever all of the observable sequences have produced an element at a corresponding index.\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":1793,"sourceCodeEnd":1829,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/Observable.Multiple.Zip.cs#L1793-L1829","documentation":"The fifteen-source Zip overload ends its argument validation with a null check on the fifteenth observable sequence, throwing ArgumentNullException at Observable.Multiple.Zip.cs:1811 if it is null. System.Reactive throws eagerly so the composed query is guaranteed to have a valid source in every position.","triggerScenarios":"Calling the public static Observable.Zip overload taking up to fifteen IObservable<T> sources with null in the fifteenth (last) argument position, right before s_impl.Zip(first, ..., fifteenth) is invoked.","commonSituations":"A trailing optional stream left as null after a code change; building the argument list from a collection that is one element short; copy-paste edits that dropped the final source initializer.","solutions":["Pass a valid IObservable<T> as the fifteenth argument, or substitute Observable.Empty<TFifteenth>().","Null-check/coalesce all fifteen source variables before composing.","Fix the producer of the fifteenth sequence so it never returns null.","Use the IEnumerable-based Zip overload when source count is dynamic.","Wrap composition in try/catch (ArgumentNullException) with context about the missing source."],"exampleFix":"// before\nvar zipped = ZipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15); // s15 == null\n// after\nvar zipped = ZipAll(s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15 ?? Observable.Empty<T15>());","handlingStrategy":"validation","validationCode":"if (s15 is null) s15 = Observable.Empty<T15>();","typeGuard":"static IObservable<T> OrEmpty<T>(IObservable<T>? s) => s ?? Observable.Empty<T>();","tryCatchPattern":"try { zipped = ZipAll(s1, ..., s15); }\ncatch (ArgumentNullException ex) when (ex.ParamName == \"fifteenth\") { zipped = Observable.Empty<(T1,...,T15)>(); }","preventionTips":["When dropping or adding a source in a 15-arity call, update all positions and re-validate.","Build argument lists programmatically from a validated collection to avoid short lists.","Substitute Observable.Empty for trailing optional streams.","Add a regression test that composes with every source non-null."],"tags":["csharp","rx","null-argument","zip","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"}