CA1500 vs. SA1309 - Which one wins?

后端 未结 6 1227
野性不改
野性不改 2021-01-01 12:36

I\'ll prefix by saying that I understand that both Code Analysis and StyleCop are meant as guidelines, and many people chose to ignore these anyway. But having said that, I

6条回答
  •  没有蜡笔的小新
    2021-01-01 12:54

    There's no conflict. Change the parameter name.

    public class SomeClass
    {
        private int namedField { get; set; }
    
        public SomeClass(int differentlyNamedField)
        {
            this.namedField = differentlyNamedField;
        }
    }
    

提交回复
热议问题