daily pastebin goal
51%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. c# overload resolution rules
  2. public static string ToFooBarString(this object obj)
  3. {
  4. ...
  5. }
  6.  
  7. public static string ToFooBarString< T >(this IEnumerable< T > obj)
  8. {
  9. ...
  10. }
  11.    
  12. Dictionary< int , string > f; // implements IEnumerable< KeyValuePair< int , string > >
  13. f.ToFooBarString(); // <--- which one is called?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top