WaitForChangedResult.Name 属性
定义
获取或设置已更改的文件或目录的名称。Gets or sets the name of the file or directory that changed.
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
属性值
已更改的文件或目录的名称。The name of the file or directory that changed.
示例
下面的示例演示了 Name 属性。The following example demonstrates the Name property. 此代码示例是为结构提供的更大示例的一部分 WaitForChangedResult 。This code example is part of a larger example provided for the WaitForChangedResult structure.
' 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)