I'm working in a C# project and using Visual Studio 2012. When Visual Studio tries to format my code, it breaks lines and make my code look difficult to read. The original code (what looks pretty nice to read for me and my team):
if (list.Any(x => x.Type == (int) EnumType.Customer))
{
}
And when Visual Studio tries to format:
if (
list.Any(
x => x.Type ==
(int) EnumType.Customer))
{
// Other break codes
}
There are a lot of other parts where it is breaking my code. I like auto formatting for some parts, but my question is: Is there a way to disable this break lines from auto formatting in Visual Studio?*
PS: I also have ReSharper installed.
Solution for long lines:
ReSharper, menu Options → Code Editing → C# → Formatting Style → Line Breaks And Wrapping.
And disable Wrap long lines:
And it really makes me crazy!