montaque

小碗喝酒,小口吃肉

博客园 首页 新随笔 联系 订阅 管理
今天下载了一个最新的版本 1.32, 发现这个版本对1.30的规则作了很多的整合。原来有十几条规则关于命名的现在归并到一条 "identifiers should be case correctly"

有一个规则不是很郁闷

写了一个简单的测试函数
public int ComputeSum(int value1,int value2)
{
    
return value1+value2;
}

没想到这个也违反了 Avoid unused parameter 规则,意思是说,避免申明了而又未使用的规则

进一步的解释

The 'this' parameter of FxCopTest.ComputeSum(Int32,  Int32):Int32 is never used. Mark the method as static or use 'this' in the method body."

很迷惑
posted on 2004-11-09 10:26  montaque  阅读(1281)  评论(10编辑  收藏  举报