我有一些正在维护的代码,其中包含大量机器生成的注释和机器生成的区域。 (或由特别误导的开发人员创建)
这些注释完全重复了方法元数据和 pascal 大小写名称的空间扩展:
#region methods
/// <summary>
/// Implementation of a public method foo bar, returning a void
/// </summary>
/// <param name="value">A string parameter named value input</param>
public void fooBar(string valueInput)
{
}
#endregion
Resharper 是否有插件或功能可以批量去除评论和#region 标签?
最佳答案
为什么不在 Visual Studio 中使用正则表达式查找和替换?
对于三重斜线评论:
///.*
对于区域标签:
[#]region.* [#]endregion
关于c# - 如何从 C# 中删除 robo-comments 和#region?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/957410/