Welcome to Windows Presentation Foundation (WPF)
Top Tasks :

WPF Community Bloggers

Sunday, July 20, 2008 - Posts

  • Generic Extension Methods

    I've discovered that if an extension method is generic and the generic type is used as the "this" parameter, you do not have to write out the generic discriminator. The compiler is smart enough to infer it for you. For example, the range validation function I shared a few weeks ago can be called like so: int myInt=5; myInt.ValidateRange(2,20); Jeff would be happy. Read More...

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us