Synopsis: | Use using statements instead of fully qualified type names |
Language: | C# |
Severity Level: | 5 |
Category: | Object oriented |
Description: |
Limit the usage of fully qualified type names in order to prevent name clashing. Wrong example: System.Collections.Generic.List<int> list = new System.Collections.Generic.List<int>(); Correct example: using System.Collections.Generic; List<int> list = new List<int>(); If you do need to prevent name clashing, use a using directive to assign an alias: using WebUILabel = System.Web.UI.WebControls.Label; |
Literature References: |
Aviva AV1510 |