Automatic parathesises and braces

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Denny

    Automatic parathesises and braces

    I'm going from VB.net.

    Is there a way to have VS automatically add braces to methods? Also in VB,
    you do not need to add () for a method or function that does not need
    parameters. Is there a way to have VS automatically add parathesis to
    function calls? This messes me up more than the braces.

    Thanks.

  • Marc Gravell

    #2
    Re: Automatic parathesises and braces

    Not that I know of... without the brackets, you have a "method group",
    which is an essential part of creating a delegate - so the syntax
    without the brackets has a partially valid (but different) meaning. To
    be honest, I wouldn't worry about it - give it a little while (not
    long, honestly) and you'll be bracing and bracketing by default - I
    moved to C# from VB6 (a very long time ago, it feels) - and it didn't
    take long to get accustomed (but then, I also write ECMA script...).
    That said, if I go back to VB I struggle to do ##anything##...

    Marc

    Comment

    • Zhi-Xin Ye [MSFT]

      #3
      RE: Automatic parathesises and braces

      Hi Denny,

      Thank you for using Microsoft Managed Newsgroup Support Service, I'm
      Zhi-Xin Ye and I will work with you on this issue.

      As far as I know the C# IDE does not support this kind of auto-completion.
      These features are specific for VB only, as you can see the options under
      this path:

      (In the IDE)
      "Tools" menu -"Options... " -"Text Editor" -"Basic" -"VB Specific";

      There are options like "Automatic insertion of end constructs", "Pretty
      listing(reforma tting) of code", etc. which are for the auto-completion.

      I know how unaccustomed it is when shifting from one language to another. I
      have the same experience when I shifted from C# to VB.NET, but it didn't
      take long to get accustomed with the new language.

      Sincerely,
      Zhi-Xin Ye
      Microsoft Managed Newsgroup Support Team

      Delighting our customers is our #1 priority. We welcome your comments and
      suggestions about how we can improve the support we provide to you. Please
      feel free to let my manager know what you think of the level of service
      provided. You can send feedback directly to my manager at:
      msdnmg@microsof t.com.

      =============== =============== =============== =====
      Get notification to my posts through email? Please refer to
      http://msdn.microsoft.com/en-us/subs...#notifications.

      Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
      where an initial response from the community or a Microsoft Support
      Engineer within 1 business day is acceptable. Please note that each follow
      up response may take approximately 2 business days as the support
      professional working with you may need further investigation to reach the
      most efficient resolution. The offering is not appropriate for situations
      that require urgent, real-time or phone-based interactions or complex
      project analysis and dump analysis issues. Issues of this nature are best
      handled working with a dedicated Microsoft Support Engineer by contacting
      Microsoft Customer Support Services (CSS) at
      http://support.microsoft.com/select/...tance&ln=en-us.
      =============== =============== =============== =====
      This posting is provided "AS IS" with no warranties, and confers no rights.


      Comment

      Working...