-
Notifications
You must be signed in to change notification settings - Fork 23
SA1026
ptittof57 edited this page Aug 15, 2015
·
5 revisions
<title>SA1026: CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation</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 |
CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation |
CheckId |
SA1026 |
Category |
Spacing Rules |
An implicitly typed new array allocation within a C# code file is not spaced correctly.
A violation of this rule occurs whenever the code contains an implicitly typed new array allocation which is not spaced correctly. Within an implicitly typed new array allocation, there should not be any space between the new keyword and the opening array bracket. For example:
var a = new[] { 1, 10, 100, 1000 };
To fix a violation of this rule, remove any whitespace between the new keyword and the opening array bracket.
[SuppressMessage("StyleCop.CSharp.SpacingRules", "SA1026:CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation", 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