R
R.A.
Hi
I have th following code:
class MyClass
{
private string filename;
public int SetInfo (string FileName)
{
filename = FileName;
}
public MyClass ()
{
FileWatcher = new FileSystemWatcher ();
FileWatcher.NotifyFilter = NotifyFilters.FileName;
FileWatcher.Filter = "*.*";
FileWatcher.Path = "C:\\temp";
FileWatcher.Created += new FileSystemEventHandler (OnFileCreated);
}
private static void OnFileCreated(object source, FileSystemEventArgs e)
{
//How to call SetInfo ?
}
}
How can I call SetInfo without having to change it to a static function?
What are the options?
Thanks
I have th following code:
class MyClass
{
private string filename;
public int SetInfo (string FileName)
{
filename = FileName;
}
public MyClass ()
{
FileWatcher = new FileSystemWatcher ();
FileWatcher.NotifyFilter = NotifyFilters.FileName;
FileWatcher.Filter = "*.*";
FileWatcher.Path = "C:\\temp";
FileWatcher.Created += new FileSystemEventHandler (OnFileCreated);
}
private static void OnFileCreated(object source, FileSystemEventArgs e)
{
//How to call SetInfo ?
}
}
How can I call SetInfo without having to change it to a static function?
What are the options?
Thanks