Skip to content

FilesystemWatcher If Statements

Sean DeYoung

Asked Mar 30, 2012, 9:48 AM EDT1 answer
Share
LinkedInX
Hello need you help. I have a FileSytemWatcher console app and I need to create If statement blocks to run when either the event is Created, Deleted, or Renamed. I can't figure out how to setup the expression to do the comparision. Any help you can provide is greated appreciated.

Thanks,

Sean

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Okay I stumbled on the answer. string ChangeTypeStrg = Convert.ToString(a.ChangeType); if (ChangeTypeStrg == "Created")
    0