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
using System;using System.Collections.Generic;publicstaticclassProgram{publicstaticvoidMain(){varparameter=newList<string>();varresult= parameter.FirstOrDefault(x => x$);}}publicstaticclassEnumerable{publicstatic TSource FirstOrDefault<TSource>(thisIEnumerable<TSource>source,TSourcedefaultValue){returndefault(TSource);}publicstatic TSource FirstOrDefault<TSource>(thisIEnumerable<TSource>source,Func<TSource,bool>predicate,TSourcedefaultValue){returndefault(TSource);}}
Set cursor to $
Type . and get no IntelliSense
Expected Behavior:
IntelliSense picks the correct overload and suggests that the type of x is string, providing member completion.
Actual Behavior:
If you change the FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue) overload to FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate), then it works as expected
The text was updated successfully, but these errors were encountered:
Version Used: VS2015.2
Steps to Reproduce:
.
and get no IntelliSenseExpected Behavior:
IntelliSense picks the correct overload and suggests that the type of
x
isstring
, providing member completion.Actual Behavior:
If you change the
FirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate, TSource defaultValue)
overload toFirstOrDefault<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate)
, then it works as expectedThe text was updated successfully, but these errors were encountered: