WaitForChangedResult 構造体とは? わかりやすく解説

WaitForChangedResult 構造体

発生した変更についての情報格納します

名前空間: System.IO
アセンブリ: System (system.dll 内)
構文構文

Public Structure WaitForChangedResult
Dim instance As WaitForChangedResult
public struct WaitForChangedResult
public value class WaitForChangedResult
public final class WaitForChangedResult extends
 ValueType
JScript では、構造体使用できますが、新規に宣言することはできません。
使用例使用例

特定のファイル変更通知が行われるのを待機して、FileSystemWatcher を同期的使用する例を次に示します

Imports System.IO

Module Module1
    Sub Main()
        ' Define a path and a file name for a temporary file.
        Dim pathname As String
 = "C:\"
        Dim filename As String
 = "JunkFile.tmp"
        Dim filepathname As String
 = Path.Combine(pathname, filename)

        ' Create the temporary file and then close it.
        File.Create(filepathname).Close()

        Console.WriteLine("This application will terminate when
 you delete the {0} file", filepathname)

        ' Have a FileSystemWatcher monitor the path and file for changes.
        Dim fsw As New FileSystemWatcher(pathname,
 filename)
        fsw.NotifyFilter = NotifyFilters.FileName
        fsw.EnableRaisingEvents = True

        ' 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)
    End Sub
End Module

' This code produces the following output.
' 
'  This application will terminate when you delete the C:\JunkFile.tmp
 file
'  The JunkFile.tmp files is deleted; program is exiting
スレッド セーフスレッド セーフ
この型の public static (Visual Basic では Shared) メンバはすべて、スレッド セーフです。インスタンス メンバ場合は、スレッド セーフであるとは限りません。
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
WaitForChangedResult メンバ
System.IO 名前空間
FileSystemEventArgs クラス
FileSystemEventHandler デリゲート
FileSystemWatcher クラス
InternalBufferOverflowException クラス
NotifyFilters 列挙
RenamedEventArgs クラス
RenamedEventHandler デリゲート
WaitForChanged
WatcherChangeTypes



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「WaitForChangedResult 構造体」の関連用語

WaitForChangedResult 構造体のお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



WaitForChangedResult 構造体のページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2024 Microsoft.All rights reserved.

©2024 GRAS Group, Inc.RSS