jjzjj

DataGridViewMyCustomCell

全部标签

c# - CA2000 将对象引用传递给 C# 中的基本构造函数

当我通过VisualStudio的代码分析实用程序运行某些代码时收到警告,我不确定如何解决。也许这里有人遇到过类似的问题并解决了它,并愿意分享他们的见解。我正在对DataGridView控件中使用的自定义绘制单元格进行编程。代码类似于:publicclassDataGridViewMyCustomColumn:DataGridViewColumn{publicDataGridViewMyCustomColumn():base(newDataGridViewMyCustomCell()){}它会生成以下警告:CA2000:Microsoft.Reliability:在方法“DataGri