WaitForChangedResult.Name 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定變更的檔案或目錄的名稱。
public:
property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string? Name { get; set; }
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String
屬性值
變更的檔案或目錄的名稱。
範例
下列範例示範 Name 屬性。 此程式代碼範例是針對 結構提供之較大範例的 WaitForChangedResult 一部分。
' Suspend the calling thread until the file has been deleted.
Dim cr As IO.WaitForChangedResult = fsw.WaitForChanged(WatcherChangeTypes.Deleted)
' Tell the user the file is deleted and exit.
Console.WriteLine("The {0} files is deleted; program is exiting", cr.Name)