c# - ReSharper 代码清理

标签 c# resharper

当字段或方法用于类型('static-ally'), 但 stringlong 用于变量初始化?

例子:

string name = "@user";
// but
int compResult = String.Compare(a, b, ...);

long x = 0;
// but
long x = Int64.Parse(s);

最佳答案

目前没有 ReSharper 选项让 String 优于 string

同样的问题是 recently asked on their community board .

关于c# - ReSharper 代码清理,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10568112/

相关文章:

c# - 是否可以从标量函数的结果为 Id 分配默认值

C# : How to convert a local pdf file to a byte [][]

resharper - 如何将ReSharper单元测试体系结构更改为x64?

c# - 有没有办法告诉 Resharper 6 忽略新的异步语言功能?

c# - Resharper 查找模式并替换 - 如何插入字符串

c# - 通用方法和非通用方法之间的性能差异

c# - 对明显非空对象的空引用

c# - 如何在 C# 中将 xml 格式的 key 对更改为 PEM 格式?

Resharper Test Runner 抢夺焦点

c# - 如果使用了特定的枚举值,如何生成警告