2020-06-30 12:47:33 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
== Noncompliant Code Example
|
|
|
|
|
|
|
|
----
|
|
|
|
Public Function NumberOfMinutes(ByVal hours As Integer) As Integer
|
|
|
|
Dim seconds As Integer = 0 ' Seconds never used
|
|
|
|
Return hours * 60
|
|
|
|
End Function
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
----
|
|
|
|
Public Function NumberOfMinutes(ByVal hours As Integer) As Integer
|
|
|
|
Return hours * 60
|
|
|
|
End Function
|
|
|
|
----
|
|
|
|
|
|
|
|
== Exceptions
|
|
|
|
|
2021-01-27 13:42:22 +01:00
|
|
|
Unused locally created resources in a ``++Using++`` statement are not reported.
|
2020-06-30 14:49:38 +02:00
|
|
|
|
2020-06-30 12:47:33 +02:00
|
|
|
----
|
|
|
|
Using t = New TestTimer()
|
|
|
|
End Using
|
|
|
|
----
|