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)