{"record":{"id":"7117867ecbda59cd","repo":"dotnet/reactive","slug":"throw-new-argumentnullexception-nameof-tenth","errorCode":null,"errorMessage":"throw new ArgumentNullException(nameof(tenth))","messagePattern":"throw new ArgumentNullException\\(nameof\\(tenth\\)\\)","errorType":"exception","errorClass":"ArgumentNullException","httpStatus":null,"severity":"error","filePath":"Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs","lineNumber":914,"sourceCode":"                throw new ArgumentNullException(nameof(first));\n            if (second == null)\n                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            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 first.Provider.CreateQuery<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>(\n                Expression.Call(\n                    null,\n                    new Func<IQbservable<TFirst>, IObservable<TSecond>, IObservable<TThird>, IObservable<TFourth>, IObservable<TFifth>, IObservable<TSixth>, IObservable<TSeventh>, IObservable<TEighth>, IObservable<TNinth>, IObservable<TTenth>, IObservable<TEleventh>, IObservable<TTwelfth>, IObservable<TThirteenth>, IObservable<TFourteenth>, IObservable<TFifteenth>, IObservable<TSixteenth>, IQbservable<(TFirst First, TSecond Second, TThird Third, TFourth Fourth, TFifth Fifth, TSixth Sixth, TSeventh Seventh, TEighth Eighth, TNinth Ninth, TTenth Tenth, TEleventh Eleventh, TTwelfth Twelfth, TThirteenth Thirteenth, TFourteenth Fourteenth, TFifteenth Fifteenth, TSixteenth Sixteenth)>>(CombineLatest<TFirst, TSecond, TThird, TFourth, TFifth, TSixth, TSeventh, TEighth, TNinth, TTenth, TEleventh, TTwelfth, TThirteenth, TFourteenth, TFifteenth, TSixteenth>).Method,\n                    first.Expression,","sourceCodeStart":896,"sourceCodeEnd":932,"githubUrl":"https://github.com/dotnet/reactive/blob/94b5d5ab912789f5abe9a72138a25bbd716fe59c/Rx.NET/Source/src/System.Reactive/Linq/QbservableEx.Homoicon.cs#L896-L932","documentation":"System.ArgumentNullException raised by the null-guard for the tenth source in a CombineLatest overload in QbservableEx.Homoicon.cs. Very high-arity overloads (10-16 sources) check every argument in sequence; the tenth slot received null.","triggerScenarios":"Invoking the 10+ argument Qbservable.CombineLatest overload with tenth == null at line 914 of the guard chain.","commonSituations":"Building mega-queries over many telemetry streams where one stream provider returned null; copy-paste errors in long argument lists where the tenth slot was left as placeholder null.","solutions":["Supply a valid tenth IQbservable argument.","If one stream is optional, merge in an empty default stream instead of null.","Refactor to combine sources incrementally (pairs) so each call is small and readable.","Audit the stream factory responsible for the tenth source."],"exampleFix":"// before\nCombineLatest(s1,s2,s3,s4,s5,s6,s7,s8,s9, tenthStream, sel); // tenthStream == null\n// after\ntenthStream ??= provider.CreateQuery<T10>(Expression.Constant(Observable.Empty<T10>()));\nCombineLatest(s1,s2,s3,s4,s5,s6,s7,s8,s9, tenthStream, sel);","handlingStrategy":"validation","validationCode":"if (s10 == null) throw new ArgumentException(\"tenth source must be provided\", nameof(s10));","typeGuard":"static bool IsNonNullSource<T>(IQbservable<T> s) => s != null;","tryCatchPattern":"try { CombineLatest(..., s10, ...); } catch (ArgumentNullException ex) when (ex.ParamName == \"tenth\") { /* rebuild query with default tenth source */ }","preventionTips":["Count arguments carefully in 10+ arity overloads","Copy-paste check placeholder 'null' literals in long calls","Replace mega-overloads with incremental combining","Assert non-null sources in debug builds"],"tags":["argumentnull","qbservable","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"}