我有一个叫做的方法 FormattedJoin()
在一个实用程序类中调用 ArrayUtil
。我试过重命名 FormattedJoin()
到了 Join()
因为它的行为类似于.NET string.Join()
所以我认为使用相同的名称是有道理的。但是,当我尝试使用Visual Studio重命名该方法时,我收到此警告:
This member may have compiler generated references
with the same name. Refactoring the member will not
update these references, which may introduce semantic
changes and/or build errors into your code.
我可以很好地重命名该方法,它不会导致生成错误或编译器警告。这样做是否安全,或者我应该避免使用具有此名称的方法?
看到这个错误后,我打开了 反光 看看我是否能找到.NET内部“ArrayUtil.Join()
“或者它的任何变化,它看起来都不像。即使有一个”ArrayUtil.Join()
“虽然方法,不会有一个不同的命名空间使这成为一个非问题?