static void Main(string[] args) { //Create a new instance of DriveDetector DriveDetector d = new DriveDetector(); //Subscribes on events d.DriveArrivedEvent += DOnDriveArrivedEvent; d.DriveRemovedEvent += DOnDriveRemovedEvent; d.DriveConfigurationChangedEvent += DOnDriveConfigurationChangedEvent; d.DriveDockingEvent += DOnDriveDockingEvent; //Start drive detecting d.Start(); Console.ReadKey(); //Stop drive detecting d.Stop(); }