Application.PackagePassword 属性

定义

设置包的密码值。 此属性是只写的。

public:
 property System::String ^ PackagePassword {  void set(System::String ^ value); };
public string PackagePassword { set; }
member this.PackagePassword : string
Public Property PackagePassword As String

属性值

包含包密码的字符串。

示例

下面的代码示例演示如何在包上设置密码。

class ApplicationTests  
{  
        static void Main(string[] args)  
        {  
            Application app = new Application();  
            String pkgPswd = "myPassword";  
            app.PackagePassword = pkgPswd;  
        }  
    }  
Class ApplicationTests  
        Sub Main(ByVal args() As String)  
            Dim app As Application =  New Application()   
            Dim pkgPswd As String =  "myPassword"   
            app.PackagePassword = pkgPswd  
        End Sub  
End Class  

适用于