Stephen Mercer

My feedback

  1. 1,639 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…)
      14 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
      Stephen Mercer commented  · 

      Possible syntax:
      public static this SomeClass int SomeProperty { get {} set{} }
      public static this SomeClass int SomeIndexer[int i] { get {} set{} }

      No need to declare an "obj" variable. Just need to declare the "owning" class type up front. I put it before the return value so that if you have a long list of such properties, that becomes part of the fixed portion of the declaration:

      public static this SomeClass int SomeProperty { get {} set{} }
      public static this SomeClass double SomeOtherProperty { get {} set{} }

      Stephen Mercer supported this idea  · 

    Feedback and Knowledge Base