Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我尝试在 Resharper 中编写自定义规则以拆分方法时,当替换模式 屏幕中有多个方法时,我无法保存规则(它说 method1 是意外标记,尽管当我删除 method2 时一切正常)
有什么办法可以做到这一点?
不幸的是,这是不可能的。结构搜索和替换功能适用于代码“单元”,而不是文本。所以它可以替换单个表达式或方法,但不能替换多个方法。