ReSharper - 格式化泛型类型约束

ReSharper - format generic type constraint

这是来自 this MSDN page 的泛型类型约束声明示例:

class MyClass<T, U>
    where T : class
    where U : struct
{ }

是否可以使用 ReSharper 以这种方式格式化我的 class?目前在格式化运行后,声明位于一行:

class MyClass<T, U> where T : class where U : struct
{ }

在 ReSharper 选项中搜索 type constraints。取消勾选 Allow type contsraints on the same line 应该会保留您想要的格式。