c# - Symbol not found on Comparer<T> -


i using .net framework 4.0

for reason visual studio highlighting method red , tool tip has:

'cannot resolve symbol 'create''

i can't see why compiler complain. static method on generic .net framework class:

system.collections.generic.comparer<string>.create((x,y)=>x.compareto(y)); 

the method create exists on comparer class. visual studio drop down options static methods/properties shows me static property 'default' on class comparer , don't see why doesn't show static create method.

here microsoft code class:

public abstract class comparer<t> : icomparer, icomparer<t> {     public static comparer<t> create(comparison<t> comparison)     {         contract.ensures(contract.result<comparer<t>>() != null);          if (comparison == null)             throw new argumentnullexception("comparison");          return new comparisoncomparer<t>(comparison);     } 

ok - john saunders - looked on microsoft documentation , create method introduced in .net 4.5.

i not sure why visual studio shows me .net 4.5 version of code when project set 4.0


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -