Author Topic: C# Syntax Expansion problem : try  (Read 1596 times)

Wanderer

  • Senior Community Member
  • Posts: 557
  • Hero Points: 23
C# Syntax Expansion problem : try
« on: May 03, 2010, 10:06:26 pm »
Hello,

Start with this:
Code: [Select]
void Main()
{
    int a;
    doSomething();
}
Above "int a;", type 'try' and accept the expansion:
Code: [Select]
void Main()
    try
    {
        // cursor is here
    }
    catch ()
    {
    }
    int a;
    doSometthing();
}

Use the down-arrow key to put the appropriate code in the try block, end up with this:
Code: [Select]
void Main()
{
    try
    {
        }
        int a;
        doSometthing();
    }
    catch ()
    {
}


SlickEdit Version 15.0.0.4    Build Date: April 21, 2010
Emulation: Vim

OS: Windows Vista    OS Version: 6.00.6002  Service Pack 2
Screen Size: 1280 x 1022
Project Type:
Language: .cs (C#)



ScottW, VP of Dev

  • Senior Community Member
  • Posts: 1471
  • Hero Points: 64
Re: C# Syntax Expansion problem : try
« Reply #1 on: May 04, 2010, 02:10:51 pm »
OK, I was finally able to reproduce this. It seems to be related to the setting for "Place 'else' on same line as '}'". Until this is fixed, you may want to change that setting, assuming you have that degree of freedom in your coding standards.