-
Notifications
You must be signed in to change notification settings - Fork 22
SA1126
ptittof57 edited this page Aug 15, 2015
·
3 revisions
<title>SA1126: PrefixCallsCorrectly</title>
<script src="script/helpstudio.js" type="text/javascript"></script>
<script src="script/StandardText.js" type="text/jscript"></script>
<script type="text/jscript">WritePageTop(document.title);</script>
TypeName |
PrefixCallsCorrectly |
CheckId |
SA1126 |
Category |
Readability Rules |
A call to a member is not prefixed with the 'this.', 'base.', 'object.' or 'typename.' prefix to indicate the intended method call, within a C# code file.
A violation of this rule occurs whenever the code contains a call to a member which is not prefixed correctly.
In some case from sourcecode analysis we cannot be sure which prefix is required. It could be 'this', 'base', 'object', the typename of the class we're in or one of our base classes.
To fix a violation of this rule, insert the correct prefix before the call to the class member.
[SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1126:PrefixCallsCorrectly", Justification = "Reviewed.")]
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop