Ejemplo n.º 1
0
 private static EqualityComparer <T> Create()
 {
     // The compiler will overwrite the Create method with optimized
     // instantiation-specific implementation.
     // This body serves as a fallback when instantiation-specific implementation is unavailable.
     return(_default = EqualityComparerHelpers.GetUnknownEquatableComparer <T>());
 }
Ejemplo n.º 2
0
        private static EqualityComparer <T> Create()
        {
#if PROJECTN
            // The compiler will overwrite the Create method with optimized
            // instantiation-specific implementation.
            throw new NotSupportedException();
#else
            // The compiler will overwrite the Create method with optimized
            // instantiation-specific implementation.
            // This body serves as a fallback when instantiation-specific implementation is unavailable.
            return(_default = EqualityComparerHelpers.GetUnknownEquatableComparer <T>());
#endif
        }