i have a c# window application form in which i have made options through the menustrip like file---> Open-----> New----> EXIT .... etc
here i have written the code this.close() for EXIT. and if i run the application and click the EXIT it will close the application
Now i want the same thing to be occured if i press ctrl+x through the Keybord.
EventLog evtLog = new EventLog();
evtLog.Source = "TestSource";
evtLog.WriteEntry("This is a test", EventLogEntryType.Information);
I now decide to use my own custom log so I change "System" to "TestLog".
This doesn't do anything. The event is still logged to the "System" log even if I try deleting the source but if I use a different source, it then gets logged correctly to "TestLog"
If I go into the registry, I find a list of sources for the System event log but even if I delete the TestSource entry from there it still logs events to the System event log.
This MSDN article suggests that you can remove a source association from a log but it's not correct as far as I can tell:
I want derived class to automatically call a particular base class method BEFORE "return" statement, how can I do that?
class SomeDerived : SomeBase <br />
public SomeDerived() << Constructor called *After* SomeBase's constructor is invoked<br />
SomeMethod(); << This is what I plan to do, but I don't want burden of invoking thisbaseclass method to resides on Derived class (and at same time I can't put this on base class constructor because this must wait till Derived class finishes before invoking)<br />
class SomeBase<br />