如何在(FxCop)Introspector&的dll级别单独分离(for,foreach,while&do-do-while)循环部分。用C#语言编写的代码。 规则详情: 1)我需要识别循环。 2)然后我需要找到在循环中实例化了多少个对象。 3)在introspector中,我在块语句下使用关键词识别出“块”(dll - >类型 - >类名 - >成员 - >方法名称 - > Body =)中的循环科”。 4)但我的问题是一个简单的for循环,“分支”关键字& for循环内容重复多次。
Eg:
for (int i = 0; i < 100; i++)
{
StringBuilder sb = new StringBuilder();
}