Fel*_*ani 47 .net c# architecture resharper visual-studio
我正在使用C#项目并使用Visual Studio 2012.当Visual Studio尝试格式化我的代码时,它会破坏行并使我的代码看起来难以阅读.原始代码(对我和我的团队来说看起来很棒):
if (list.Any(x => x.Type == (int) EnumType.Customer))
{
}
Run Code Online (Sandbox Code Playgroud)
当Visual Studio尝试格式化时:
if (
list.Any(
x => x.Type ==
(int) EnumType.Customer))
{
// Other break codes
}
Run Code Online (Sandbox Code Playgroud)
还有很多其他部分会破坏我的代码.我喜欢某些部分的自动格式化,但我的问题是:有没有办法在Visual Studio中禁用自动格式化这个断行?*
PS:我也安装了ReSharper.
Fel*_*ani 85
长线解决方案:
ReSharper,菜单选项 → 代码编辑 → C# → 格式化样式 → 换行和换行.
并禁用Wrap long lines:

它真的让我疯了!
| 归档时间: |
|
| 查看次数: |
24974 次 |
| 最近记录: |