vb System.Security.Permissions.HostProtectionAttribute.SelfAffectingProcessMgmt类(方法)实例源码

下面列出了vb System.Security.Permissions.HostProtectionAttribute.SelfAffectingProcessMgmt 类(方法)源码代码实例,从而了解它的用法。

作者:VB.NET开发    项目:System.Security.Permission   
' 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


问题


面经


文章

微信
公众号

扫码关注公众号