Left handed commas are a standard where I work in the SQL. I think this causes some funky formatting in Visual Studio (.Net)
Consider some SQL
SELECT Field1
, Field2
, Field3
, Field4
, Field5
, Field6
, Field7
FROM SomeTable
Note the left-sided comma.
Now consider that you might wish to have an enum of the column names (in this case we don’t actually care about the order, we just use the enum to hold the name). So in Visual Studio, create the enum and paste in the column names
public enum TableQuoteFundColumns
{
Field1
, Field2
, Field3
, Field4
, Field5
, Field6
, Field7
Now close the curly bracket ‘}’ and watch VS autoformat.
public enum TableQuoteFundColumns
{
Field1
, Field2
, Field3
, Field4
, Field5
, Field6
, Field7
}
public enum TableQuoteFundColumns
{
Field1
, Field2
, Field3
, Field4
, Field5
, Field6
, Field7
}
I think this has to be due to the left-sided commas… Any suggestions???
Update
If you use SearchAndReplace (ctrl-h) and Use RegularExpressions then you can fix it with
Find What: \n[ \t]*,
Replace With: ,\n\t