Analysing FxCop / Code Analysis warning CA1506: Av

2019-04-08 15:34发布

I'm getting Visual Studio Code Analysis warning CA1506 for a C# class. It says, "'FormMain' is coupled with 93 different (non-IComponent) types from 25 different namespaces. Rewrite or refactor this class's methods to decrease its class coupling, or consider moving some of the class's methods to some of the other types it is tightly coupled with. A class coupling above 95 indicates poor maintainability, a class coupling between 95 and 80 indicates moderate maintainability, and a class coupling below 80 indicates good maintainability."

My question is simply, where can I see a list of all of the types that FormMain is coupled to, so I can understand the situation better?

Thanks.

1条回答
何必那么认真
2楼-- · 2019-04-08 15:47

You can use Reflector to analyze everything a class uses (right-click on the class, click 'Analyze', expand 'Depends On')

查看更多
登录 后发表回答