Click here to Skip to main content
15,909,051 members
Home / Discussions / C#
   

C#

 
GeneralRe: object[] result Pin
originSH4-Jul-07 23:52
originSH4-Jul-07 23:52 
QuestionWebClient?? C#2005 Pin
bug_aonz4-Jul-07 22:47
bug_aonz4-Jul-07 22:47 
QuestionRemoving event handlers Pin
archies_san4-Jul-07 22:44
archies_san4-Jul-07 22:44 
AnswerRe: Removing event handlers Pin
Diana Fernandez4-Jul-07 23:19
Diana Fernandez4-Jul-07 23:19 
AnswerRe: Removing event handlers Pin
Martin#4-Jul-07 23:33
Martin#4-Jul-07 23:33 
GeneralRe: Removing event handlers Pin
archies_san5-Jul-07 20:21
archies_san5-Jul-07 20:21 
GeneralRe: Removing event handlers Pin
Martin#5-Jul-07 20:30
Martin#5-Jul-07 20:30 
AnswerRe: Removing event handlers Pin
Bekjong4-Jul-07 23:37
Bekjong4-Jul-07 23:37 
No there isn't. You can't set an event to be null or something for example, which is strange because it is initialized to be null. Here's my way of going around it:

public event EventHandler ExampleEvent;

        public void UnHook()
        {
            Collection<EventHandler> ExampleHandlers = new Collection<EventHandler>();

            foreach (Delegate d in this.ExampleEvent.GetInvocationList())
                ExampleHandlers.Add(d as EventHandler);

            foreach (EventHandler e in ExampleHandlers)
                this.ExampleEvent-= e;
        }


I don't know if there's a better way for this, but this works for me...

Standards are great! Everybody should have one!

QuestionAnimated gifs Pin
pokabot4-Jul-07 21:48
pokabot4-Jul-07 21:48 
AnswerRe: Animated gifs Pin
Urs Enzler4-Jul-07 22:01
Urs Enzler4-Jul-07 22:01 
QuestionEditorAttribute Pin
urbane.tiger4-Jul-07 21:36
urbane.tiger4-Jul-07 21:36 
QuestionHelp for developing search engine .net Pin
rparsi4-Jul-07 21:12
rparsi4-Jul-07 21:12 
AnswerRe: Help for developing search engine .net Pin
Vikram A Punathambekar4-Jul-07 21:38
Vikram A Punathambekar4-Jul-07 21:38 
GeneralRe: Help for developing search engine .net Pin
rparsi4-Jul-07 21:50
rparsi4-Jul-07 21:50 
GeneralRe: Help for developing search engine .net Pin
originSH4-Jul-07 22:39
originSH4-Jul-07 22:39 
AnswerRe: Help for developing search engine .net Pin
originSH4-Jul-07 22:38
originSH4-Jul-07 22:38 
GeneralRe: Help for developing search engine .net Pin
ganti.r5-Jul-07 0:27
ganti.r5-Jul-07 0:27 
AnswerRe: Help for developing search engine .net Pin
NormDroid4-Oct-07 2:24
professionalNormDroid4-Oct-07 2:24 
QuestionHow to use the logging application block in Enterprise Library 3.0 , to log into a flat file Pin
rameshbhojan4-Jul-07 20:57
rameshbhojan4-Jul-07 20:57 
AnswerRe: How to use the logging application block in Enterprise Library 3.0 , to log into a flat file Pin
ganti.r5-Jul-07 0:49
ganti.r5-Jul-07 0:49 
QuestionHow to upload & Display Image in Desktop application Pin
mr_shoaib4-Jul-07 20:56
mr_shoaib4-Jul-07 20:56 
Question[Solved] Is it possible to force columntype in the datagridview, for a given object property, when using databinding? [modified] Pin
Larantz4-Jul-07 20:44
Larantz4-Jul-07 20:44 
Questionwant to make an uninstaller Pin
devesh_code4-Jul-07 20:18
devesh_code4-Jul-07 20:18 
AnswerRe: want to make an uninstaller Pin
Vikram A Punathambekar4-Jul-07 21:00
Vikram A Punathambekar4-Jul-07 21:00 
GeneralRe: want to make an uninstaller Pin
devesh_code4-Jul-07 21:13
devesh_code4-Jul-07 21:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.