30 lines
724 B
Plaintext
30 lines
724 B
Plaintext
![]() |
Although unnecessary won't change anything to the produced application, removing them:
|
||
|
* Will help readability and maintenance.
|
||
|
* Will help reduce the number of items in the IDE auto-completion list when coding.
|
||
|
* May avoid some name collisions.
|
||
|
* May improve compilation time because the compiler has fewer namespaces to look-up when it resolves types.
|
||
|
|
||
|
== Noncompliant Code Example
|
||
|
|
||
|
----
|
||
|
Imports System.Collections.Generic // Noncompliant - unnecessary using
|
||
|
|
||
|
Module Module1
|
||
|
Sub Main(path As String)
|
||
|
File.ReadAllLines(path);
|
||
|
End Sub
|
||
|
End Module
|
||
|
----
|
||
|
|
||
|
== Compliant Solution
|
||
|
|
||
|
----
|
||
|
Imports System.IO
|
||
|
|
||
|
Module Module1
|
||
|
Sub Main(path As String)
|
||
|
File.ReadAllLines(path);
|
||
|
End Sub
|
||
|
End Module
|
||
|
----
|