Adam

My feedback

  1. 38 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…)
      12 comments  ·  Visual Studio IDE » Languages - C#  ·  Flag idea as inappropriate…  ·  Admin →
      Adam commented  · 

      If you are goto adverse, I'd argue a lambda might make more sense than wrapping the code in a function. That way, the closure captures the needed data without needing lots of function parameters.

      In either case, breaking 'n' levels deep is extremely fragile and prone to error. If you are writing code that looks like this, you probably are in need of a refactor anyway if you expect someone else to be able to reason about your code.

    • 383 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…)
        30 comments  ·  Visual Studio IDE » IDE and Editor  ·  Flag idea as inappropriate…  ·  Admin →
        Adam commented  · 

        The main scenario I can think of is when commenting out a block of code that contains comments already.

        int x = 42;
        // Calculate something expensive
        doStuff(x);

        Toggling the block of code might produce something like this:

        //int x = 42;
        Calculate something expensive
        //doStuff(x);

        Where as Add Comment would do this:

        //int x = 42;
        ////Calculate something expensive
        //doStuff(x);

        or sometimes:
        /*int x = 42;
        //Calculate something expensive
        doStuff(x);*/

        Adam commented  · 

        Meh... Ctrl-k+Ctrl-C is only one more key stroke than your proposed Ctrl-/ if you hold the ctrl key, plus you get individual control over whether or not you want to comment or uncomment. doesn't really sound that useless too me.

      Feedback and Knowledge Base