rspec/rules/S2355/vbnet/rule.adoc
2022-02-04 16:28:24 +00:00

36 lines
561 B
Plaintext

Array literals are more compact than array creation expressions.
== Noncompliant Code Example
[source,vbnet]
----
Module Module1
Sub Main()
Dim foo = New String() {"a", "b", "c"} ' Noncompliant
End Sub
End Module
----
== Compliant Solution
[source,vbnet]
----
Module Module1
Sub Main()
Dim foo = {"a", "b", "c"} ' Compliant
End Sub
End Module
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
endif::env-github,rspecator-view[]