30 lines
576 B
Plaintext
30 lines
576 B
Plaintext
[source,vbnet,diff-id=1,diff-type=noncompliant]
|
|
----
|
|
If a >= 0 AndAlso a < 10 Then
|
|
DoFirst()
|
|
DoTheThing()
|
|
ElseIf a >= 10 AndAlso a < 20 Then
|
|
DoTheOtherThing()
|
|
ElseIf a >= 20 AndAlso a < 50 ' Noncompliant; duplicates first condition
|
|
DoFirst()
|
|
DoTheThing()
|
|
Else
|
|
DoTheRest();
|
|
End If
|
|
----
|
|
|
|
[source,vbnet,diff-id=2,diff-type=noncompliant]
|
|
----
|
|
Select i
|
|
Case 1
|
|
DoFirst()
|
|
DoSomething()
|
|
Case 2
|
|
DoSomethingDifferent()
|
|
Case 3 ' Noncompliant; duplicates case 1's implementation
|
|
DoFirst()
|
|
DoSomething()
|
|
Case Else:
|
|
DoTheRest()
|
|
End Select
|
|
---- |