== Why is this an issue?

``++End++`` statements exit the control flow of the program in an unstructured way. This statement stops code execution immediately without executing ``++Dispose++`` or ``++Finalize++`` methods, or executing ``++Finally++`` blocks. Therefore, it should be avoided.

=== Noncompliant code example

[source,vbnet]
----
Module Module1
    Sub Print(ByVal str As String)
       Try
            ...
            End       ' Noncompliant
        Finally
            ' do something important here
            ...
        End Try
    End Sub
End Module
----

ifdef::env-github,rspecator-view[]

'''
== Implementation Specification
(visible only on this page)

include::../message.adoc[]

'''
== Comments And Links
(visible only on this page)

=== on 14 Oct 2015, 09:12:33 Tamas Vajk wrote:
\[~ann.campbell.2] This subtask seems to be totally different from its parent task. The parent task exits the execution of the program, while this one is more like using ``++break++`` statements or ``++goto++``s. Should we map it to something else?

=== on 14 Oct 2015, 12:43:59 Ann Campbell wrote:
\[~tamas.vajk] leaving the code samples aside, the subtask does describe the same thing as the main task if you look at the first half of the description. 


Do you verify that the descriptive task is accurate and relevant? And if so, can you supply new code samples?

=== on 15 Oct 2015, 06:33:59 Tamas Vajk wrote:
\[~ann.campbell.2] I don't think they describe the same think. The main task describes how to end the execution of the program. While the subtask says not to use control flow jumps.


Check out these links:

https://msdn.microsoft.com/en-us/library/ms157894(v=VS.90).aspx (``++Application Exit++``)

https://msdn.microsoft.com/en-us/library/t2at9t47.aspx (``++Exit++`` statements)

=== on 19 Oct 2015, 15:40:10 Ann Campbell wrote:
Fixed after collaboration with [~tamas.vajk]

include::../comments-and-links.adoc[]

endif::env-github,rspecator-view[]
