I suggest you ...

Duck typing of interfaces

One of the features that was dropped from VB9 was dynamic interfaces:
http://download.microsoft.com/download/5/8/4/5841bc1a-e864-4423-bb75-d4f3c18c0af5/visual%20basic%209.0%20overview.doc

Any chance of bringing this back? I know it can be done at runtime:
http://www.codeproject.com/Articles/16074/DuckTyping-Runtime-Dynamic-Interface-Implementatio

But that looses the compile time type checking, which is the great advantage of dynamic interfaces -- it gives you the best of both worlds, you can define a set of behavior for an existing class without having to have control over that class, based upon it's public interface, with no chance of it failing because of a missing property or method (if the class doesn't meet the requirements for the interface, compilation fails).

19 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    John MorenoJohn Moreno shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    1 comment

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Martin RossMartin Ross commented  ·   ·  Flag as inappropriate

        If this could be applied to anonymous types generated by Selects in Linq queries then it would be fantastic!

      Feedback and Knowledge Base