Specifies categories of functionality potentially harmful to the host if invoked by a method or class.
This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.
Assembly: mscorlib (in mscorlib.dll)
Exposes all host resources.
Might create or destroy other processes.
Creates or manipulates threads other than its own, which might be harmful to the host.
Might cause a resource leak on termination, if not protected by a safe handle or some other means of ensuring the release of resources.
Exposes no host resources.
Exposes the security infrastructure.
Might exit the current process, terminating the server.
Manipulates threads in a way that only affects user code.
Exposes state that might be shared between threads.
Exposes the user interface.
' Use the enumeration flags to indicate that this method exposes ' shared state and self-affecting process management. ' Either of the following attribute statements can be used to set the ' resource flags. <HostProtectionAttribute(SharedState := True, _ SelfAffectingProcessMgmt := True), _ HostProtectionAttribute( _ Resources := HostProtectionResource.SharedState Or _ HostProtectionResource.SelfAffectingProcessMgmt)> _ Private Shared Sub [Exit](ByVal Message As String, ByVal Code As Integer) ' Exit the sample when an exception is thrown. Console.WriteLine((ControlChars.Lf & "FAILED: " & Message & " " & _ Code.ToString())) Environment.ExitCode = Code Environment.Exit(Code) End Sub 'Exit
Available since 2.0