Martijn Hoekstra

My feedback

  1. 404 votes
    Vote
    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      Signed in as (Sign out)
      You have left! (?) (thinking…)
      9 comments  ·  Visual Studio IDE » User Interface  ·  Flag idea as inappropriate…  ·  Admin →
      Martijn Hoekstra commented  · 

      no fix in 2019 Preview either.

    • 3,388 votes
      Vote
      Sign in
      Check!
      (thinking…)
      Reset
      or sign in with
      • facebook
      • google
        Password icon
        Signed in as (Sign out)
        You have left! (?) (thinking…)
        34 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
        Martijn Hoekstra commented  · 

        It possible to work around this by passing the "creator function":

        public void DoSomething<T>(Func<string, int, T> creator) {
        var myt = creator("wizzle", 42)
        /* do something with myt */
        }

        calling it with something like

        DoSomething((string str, int i) => new MyT(str, i))

      • 3 votes
        Vote
        Sign in
        Check!
        (thinking…)
        Reset
        or sign in with
        • facebook
        • google
          Password icon
          Signed in as (Sign out)
          You have left! (?) (thinking…)
          1 comment  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
          Martijn Hoekstra commented  · 
          Martijn Hoekstra shared this idea  · 
        • 6,013 votes
          Vote
          Sign in
          Check!
          (thinking…)
          Reset
          or sign in with
          • facebook
          • google
            Password icon
            Signed in as (Sign out)
            You have left! (?) (thinking…)
            159 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
            Martijn Hoekstra commented  · 

            @Vladislav don't mistake a program with undefined behavior with being not well-formed. It explicitly is allowed in the language specification with undefined behaviour, nothing non-well-formed about it (but a bad idea nonetheless)

          • 165 votes
            Vote
            Sign in
            Check!
            (thinking…)
            Reset
            or sign in with
            • facebook
            • google
              Password icon
              Signed in as (Sign out)
              You have left! (?) (thinking…)
              12 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
              Martijn Hoekstra commented  · 

              @Marcel Roma addition of an immutable ro readonly keyword for a struct/class that would be syntactic suger for readonly on all the types fields would be a (nice) language addition though.

            • 1,184 votes
              Vote
              Sign in
              Check!
              (thinking…)
              Reset
              or sign in with
              • facebook
              • google
                Password icon
                Signed in as (Sign out)
                You have left! (?) (thinking…)
                17 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                Martijn Hoekstra commented  · 

                I like much of this, but they all have valid use cases, so if any of these are implemented, they should require manual activation runs, as they could have false positives, and the result should never be bad enough to be a warning (but it would be handy to have an information item on them). Some points that haven't been touched on yet:

                - Detect when first line of if block and else block are identical (same for last line) : This would be really nice

                - Detect methods used only one time - Method is a candidate for in-lining
                - Detect constant defined in class used only one time : I wouldn't even want a note for these, this is just good practice

                - Detect public property used only within the same class - make it protected/private
                - Detect public method used only within the same class - make it protected/private : As touched upon by others. However, if you are the primary consumer of your own library, it could be nice to know which properties/methods you're not touching within a larger project. They could well be candidates for making them less priviledged, even if in some/many/most (depending on the library) cases they aren't

                - Detect unused references in a project : This may be needed to satisfy dependencies for dynamically loaded classes.

              • 780 votes
                Vote
                Sign in
                Check!
                (thinking…)
                Reset
                or sign in with
                • facebook
                • google
                  Password icon
                  Signed in as (Sign out)
                  You have left! (?) (thinking…)
                  30 comments  ·  Visual Studio IDE » .NET  ·  Flag idea as inappropriate…  ·  Admin →
                • 1,321 votes
                  Vote
                  Sign in
                  Check!
                  (thinking…)
                  Reset
                  or sign in with
                  • facebook
                  • google
                    Password icon
                    Signed in as (Sign out)
                    You have left! (?) (thinking…)
                    5 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
                  • 26 votes
                    Sign in
                    Check!
                    (thinking…)
                    Reset
                    or sign in with
                    • facebook
                    • google
                      Password icon
                      Signed in as (Sign out)

                      We’ll send you updates on this idea

                    • 266 votes
                      Vote
                      Sign in
                      Check!
                      (thinking…)
                      Reset
                      or sign in with
                      • facebook
                      • google
                        Password icon
                        Signed in as (Sign out)
                        You have left! (?) (thinking…)
                        8 comments  ·  Visual Studio IDE » IDE and Editor  ·  Flag idea as inappropriate…  ·  Admin →
                      • 4,985 votes
                        Vote
                        Sign in
                        Check!
                        (thinking…)
                        Reset
                        or sign in with
                        • facebook
                        • google
                          Password icon
                          Signed in as (Sign out)
                          You have left! (?) (thinking…)
                          79 comments  ·  Visual Studio IDE » Project  ·  Flag idea as inappropriate…  ·  Admin →
                          Martijn Hoekstra supported this idea  · 
                          Martijn Hoekstra shared this idea  · 

                        Feedback and Knowledge Base