28 lines
505 B
Plaintext
28 lines
505 B
Plaintext
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
|
|
|
|
Unused locally created resources in a ``++Using++`` statement are not reported.
|
|
|
|
----
|
|
Using t = New TestTimer()
|
|
End Using
|
|
----
|