rspec/rules/S2355/vbnet/rule.adoc

25 lines
370 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
Array literals are more compact than array creation expressions.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
Module Module1
Sub Main()
Dim foo = New String() {"a", "b", "c"} ' Noncompliant
End Sub
End Module
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
Module Module1
Sub Main()
Dim foo = {"a", "b", "c"} ' Compliant
End Sub
End Module
----