Click here to Skip to main content
15,880,392 members
Home / Discussions / C#
   

C#

 
AnswerRe: how can the software retrieve machine's servername and change the datasource to the machine's servername... Pin
Rob Graham5-May-07 4:15
Rob Graham5-May-07 4:15 
QuestionDevelop web application using communicator web access Pin
Hardik Patel (GTL)4-May-07 23:30
Hardik Patel (GTL)4-May-07 23:30 
Questionhow to insert unicode into SQL server from c# Pin
rehab14-May-07 21:49
rehab14-May-07 21:49 
AnswerRe: how to insert unicode into SQL server from c# Pin
Seishin#5-May-07 0:25
Seishin#5-May-07 0:25 
AnswerRe: how to insert unicode into SQL server from c# Pin
Muammar©5-May-07 1:49
Muammar©5-May-07 1:49 
AnswerRe: how to insert unicode into SQL server from c# Pin
Rob Graham5-May-07 4:08
Rob Graham5-May-07 4:08 
AnswerRe: how to insert unicode into SQL server from c# Pin
AFSEKI7-May-07 2:59
AFSEKI7-May-07 2:59 
QuestionAssigning EventHandler once in a method invoked many times Pin
Seishin#4-May-07 21:29
Seishin#4-May-07 21:29 
Hi!
Is there a way to check if an event handler for an object has been already assigned in "current" object?!

ex.

<br />
class objOne{<br />
public event EventHandler<EventArgs> someEvent;<br />
}<br />
<br />
class objTwo{<br />
public objOne;<br />
<br />
public event EventHandler<EventArgs> someOtherEvent;<br />
}<br />
<br />
class objThree{<br />
objThree(objTwo someObjectTwo){<br />
someObjectTwo.someOtherEvent+=new EventHandler(someDelegate); <br />
}<br />
<br />
void someDelegate(object sender, EventArgs e){ //***<br />
objTwo.objOne.someEvent+=new EventHandler(someOtherDelegate); <br />
}<br />
}


someDelegate is invoked a few times and evey time it adds someOtherDelegate to the objTwo.objOne.someEvent.. my goal is to add this delegate only once..
the only idea that comes to me is to add a flag field in objOne specially for objThree but that takes away flexibility..

thanks for any help!!


life is study!!!

AnswerRe: Assigning EventHandler once in a method invoked many times Pin
Arun.Immanuel4-May-07 21:42
Arun.Immanuel4-May-07 21:42 
AnswerRe: Assigning EventHandler once in a method invoked many times Pin
Seishin#5-May-07 0:23
Seishin#5-May-07 0:23 
GeneralRe: Assigning EventHandler once in a method invoked many times Pin
Arun.Immanuel5-May-07 0:47
Arun.Immanuel5-May-07 0:47 
GeneralRe: Assigning EventHandler once in a method invoked many times Pin
Seishin#5-May-07 1:01
Seishin#5-May-07 1:01 
GeneralRe: Assigning EventHandler once in a method invoked many times Pin
Arun.Immanuel5-May-07 1:25
Arun.Immanuel5-May-07 1:25 
QuestionConnect to pc using DSL ? Pin
shdelpiero4-May-07 21:01
shdelpiero4-May-07 21:01 
AnswerRe: Connect to pc using DSL ? Pin
shdelpiero4-May-07 22:01
shdelpiero4-May-07 22:01 
GeneralRe: Connect to pc using DSL ? Pin
Muammar©5-May-07 1:47
Muammar©5-May-07 1:47 
GeneralRe: Connect to pc using DSL ? Pin
shdelpiero5-May-07 5:21
shdelpiero5-May-07 5:21 
GeneralRe: Connect to pc using DSL ? Pin
Dave Kreskowiak5-May-07 18:07
mveDave Kreskowiak5-May-07 18:07 
QuestionUploading a file from C# Windows Application to ASP.NEtTWeb form Pin
Raza Hussain4-May-07 20:19
Raza Hussain4-May-07 20:19 
QuestionAbout Webbrowser's MesssageBox Pin
amon04244-May-07 20:05
amon04244-May-07 20:05 
Questioninserting unicode character from c# program to sql server 2005 Pin
rehab14-May-07 19:54
rehab14-May-07 19:54 
AnswerRe: inserting unicode character from c# program to sql server 2005 Pin
lost in transition 4-May-07 20:22
lost in transition 4-May-07 20:22 
Questioninserting unicode character from c# to sql server 2005 Pin
rehab14-May-07 19:52
rehab14-May-07 19:52 
AnswerRe: inserting unicode character from c# to sql server 2005 Pin
Hesham Amin4-May-07 22:23
Hesham Amin4-May-07 22:23 
QuestionObject reference not set to an instance of an object. Pin
balanjingot4-May-07 19:19
balanjingot4-May-07 19:19 

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.