PermissionSetAttribute.File 屬性

定義

取得或設定含有要被宣告的自訂使用權限之 XML 表示的檔案。

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

屬性值

檔案的實體路徑,含有使用權限集的 XML 表示。

範例

下列程式碼顯示 屬性的使用 File 。 此程式碼範例是提供給 類別之較大範例的 PermissionSetAttribute 一部分。

[PermissionSetAttribute(SecurityAction.PermitOnly, File = "c:\\temp\\LocalIntranet.xml")]
<System.Security.Permissions.PermissionSetAttribute( _
    SecurityAction.PermitOnly, _
    File:="c:\temp\LocalIntranet.xml")> _
Private Sub ReadFile2()

備註

如果指定的檔案是 Unicode,請將 UnicodeEncoded 屬性設定為 true

適用於