Share via


Hello Web

Who am I?

My name is Sreekar Choudhary and Welcome to my blog, I am a Dev on the C# compiler Team. I work most of the time on language features and implementing debugging framework for C# developers inside VS.

 

What's this blog about?

Well it’s about the cool features of that I get to design and work on and any other relavent technical topic that is of interest to me or the readers.

Comments

  • Anonymous
    April 15, 2007
    The comment has been removed

  • Anonymous
    April 21, 2007
    Visual Studio Orcas Beta 1 is available for download . Though quite similar to the March CTP in terms

  • Anonymous
    April 25, 2007
    I think i am a little confused here, so let me repeat what you are saying. You would like the extension methods to be imported from the namespace that declares the type used in the "instance parameter". Well this should be done for you automatically since the namespace that decared the type must be imported before it can be used ( and so will be extension methods). Looking at your example the code could possibly not comile with out the using since we would not know how to find the defintion of public interface IMyCollection with out it. ( at the same time we will import the extensions) Hope this helps... do let me know if i am missing something Sree

  • Anonymous
    April 25, 2007
    The comment has been removed

  • Anonymous
    April 25, 2007
    btw, of course the method in my first post has the same issue: fully qualifying the interface name instead of "using" the namespace will not give you it's extension methods either. this is probably just a less common scenario that return values from other types, so i wanted to point out the latter too. stefan

  • Anonymous
    April 26, 2007
    Cool Stefan, I can totally see what you are saying. I am not aware of any plans to change the lookup rules for extension methods as of now. Though this would make the lookup for extension methods a whole lot costlier and this would certainly be a breaking change for exiting code. Its a cool feature though i see a lot of side effects.. let me think on this for a while and i will post back soon.

  • Anonymous
    April 26, 2007
    Sree, breaking changes is exactly the reason why i think you should consider it for c# 3.0 RTM. right now, there are no extension methods, and since instance methods always have precedence over extension methods, there should be no breaking changes concerning existing c# 2.0 code. once c# 3.0 is out of the house however, you'd probably have a hard time introducing that change, since users could no longer override existing extension methods from the type's namespace by omitting the using statement for that namespace. (than again, this is probably a very unlikely scenario) thanks for considering this! stefan