D Daniel Oct 6, 2006 #1 Hey guys Is it possible to create an event that is global to an application? Thanks
N Nicholas Paldino [.NET/C# MVP] Oct 6, 2006 #3 Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps.
Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps.
D Daniel Oct 7, 2006 #4 Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand...
Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand...
N Nicholas Paldino [.NET/C# MVP] Oct 7, 2006 #5 Daniel, Just do this: public class MyClass { public static event EventHandler MyEvent; } Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand... Click to expand...
Daniel, Just do this: public class MyClass { public static event EventHandler MyEvent; } Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand... Click to expand...
D Daniel Oct 7, 2006 #6 Ah so as i thought....ok thanks Nicholas Paldino said: Daniel, Just do this: public class MyClass { public static event EventHandler MyEvent; } Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand... Click to expand...
Ah so as i thought....ok thanks Nicholas Paldino said: Daniel, Just do this: public class MyClass { public static event EventHandler MyEvent; } Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Daniel said: Cool, well sicne everything in c# is in a class, where would i delcare the static event? Make a static class and put it in there? Nicholas Paldino said: Daniel, Yes, there is no reason why you can not create an event that is a static event, which would then be accessible to the whole app. Hope this helps. -- - Nicholas Paldino [.NET/C# MVP] - (e-mail address removed) Hey guys Is it possible to create an event that is global to an application? Thanks Click to expand... Click to expand... Click to expand...