rspec/rules/S1128/vbnet/rule.adoc

30 lines
724 B
Plaintext
Raw Normal View History

2020-06-30 12:47:33 +02:00
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
----