You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No diagnostic should be shown here. The name cannot be simplified without adding at least two ! suppressions due to the choice of a generic type argument (string?) that would not make sense to choose here in the first place.
_ denotes a faded span.
usingSystem;usingSystem.Collections.Generic;usingSystem.Diagnostics.CodeAnalysis;
#nullable enable
classC{boolM(IEnumerable<string>s,[NotNullWhen(true)]outstring?result){// ℹ IDE0001 "Name can be simplified. Type argument specification is redundant."// 💡 Simplify name 'TryFirst<string>' // ________returns.TryFirst<string>(x =>x.Length%2==0,outresult);}}staticclassExtensions{publicstaticboolTryFirst<T>(thisIEnumerable<T>source,Func<T,bool>predicate,[MaybeNullWhen(false)]outTvalue){thrownewNotImplementedException();}}