I suggest you ...

Allow Extesion Properties

I would like to be able to write extension Properties, not only extension methods.

112 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…)
    Eduardo AntunesEduardo Antunes shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    4 comments

    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...
      • ThainaThaina commented  ·   ·  Flag as inappropriate

        Propose syntax

        public static int SomeProperty[this SomeClass obj] { get {} set{} }
        public static int SomeIndexer[this SomeClass obj,int i] { get {} set{} }

        Yes, this can be used to make "Naming indexer"

      • Anonymous commented  ·   ·  Flag as inappropriate

        It is would be really amazing feature. I hope, VS team will give in the up coming .Net framework.

      • CarstenCarsten commented  ·   ·  Flag as inappropriate

        Absolutely. I've suggested this lately to the VsNext team, and the response was very positive.

        As always has such stuff been, it's just syntactical sugar, like properties all in all are. Still:

        var c1 = (new[] { "foo", "bar" }).Count;

        but

        var c2 = someIEnumberable.ToList().Count();

        Even coders need some eye candy ;-) Thus, thumbs up thrice!

      Feedback and Knowledge Base