Click here to Skip to main content
15,889,216 members
Home / Discussions / C#
   

C#

 
AnswerRe: open form at runtime Pin
Amar Chaudhary24-Nov-06 13:20
Amar Chaudhary24-Nov-06 13:20 
AnswerRe: open form at runtime Pin
S. Senthil Kumar24-Nov-06 20:31
S. Senthil Kumar24-Nov-06 20:31 
GeneralRe: open form at runtime Pin
lamtuanduc24-Nov-06 22:05
lamtuanduc24-Nov-06 22:05 
GeneralRe: open form at runtime Pin
S. Senthil Kumar25-Nov-06 1:42
S. Senthil Kumar25-Nov-06 1:42 
QuestionRe: open form at runtime Pin
a-erfani2-Aug-12 22:49
a-erfani2-Aug-12 22:49 
Questionrandom number genration problem Pin
Amar Chaudhary24-Nov-06 12:21
Amar Chaudhary24-Nov-06 12:21 
AnswerRe: random number genration problem Pin
S. Senthil Kumar24-Nov-06 20:23
S. Senthil Kumar24-Nov-06 20:23 
QuestionCoding Equals Operator Pin
Tom Moore24-Nov-06 9:02
Tom Moore24-Nov-06 9:02 
Hi,
Im just wondering, how do you write the equals operator in C#.
Im slightly confused about the syntax.

For example in C++ for a vector :
<br />
class vector{<br />
private:<br />
float m_x;<br />
float m_y;<br />
float m_z;<br />
<br />
public:<br />
 vector(x,y,z): m_x(x),m_y(y),m_z(z);<br />
 vector(): m_x(0),m_y(0),m_z(0);<br />
 ~vector();<br />
 <br />
 bool operator==(Vector v)<br />
 {<br />
    if (this == v)<br />
      return true;<br />
    else<br />
      return (m_x == v.m_x && v.m_y && v.m_z);<br />
 }<br />
}<br />


I know its got something to do the Equals Function and Reference Equals Method. How do you test to see if its the same instance?

Many Thanks in advance Wink | ;)

Tom
AnswerRe: Coding Equals Operator Pin
Nick Parker24-Nov-06 9:32
protectorNick Parker24-Nov-06 9:32 
GeneralRe: Coding Equals Operator Pin
Tom Moore25-Nov-06 3:49
Tom Moore25-Nov-06 3:49 
AnswerRe: Coding Equals Operator Pin
Scott Dorman27-Nov-06 5:07
professionalScott Dorman27-Nov-06 5:07 
QuestionHow to copy a datarow from myDataTable to another datatable ? Pin
hdv21224-Nov-06 8:16
hdv21224-Nov-06 8:16 
QuestionThreading Question Pin
Tristan Rhodes24-Nov-06 6:43
Tristan Rhodes24-Nov-06 6:43 
AnswerRe: Threading Question Pin
Not Active24-Nov-06 7:05
mentorNot Active24-Nov-06 7:05 
AnswerRe: Threading Question Pin
Ami Bar24-Nov-06 11:23
Ami Bar24-Nov-06 11:23 
QuestionCustomizing window forms Pin
Julio Piloto24-Nov-06 5:48
Julio Piloto24-Nov-06 5:48 
AnswerRe: Customizing window forms Pin
Amar Chaudhary24-Nov-06 6:07
Amar Chaudhary24-Nov-06 6:07 
GeneralRe: Customizing window forms Pin
Julio Piloto24-Nov-06 7:22
Julio Piloto24-Nov-06 7:22 
AnswerRe: Customizing window forms Pin
Daniel Grunwald24-Nov-06 8:43
Daniel Grunwald24-Nov-06 8:43 
QuestionA weird problem about Visual Studio 2005 Professional… Please help. Pin
Nadia Monalisa24-Nov-06 5:41
Nadia Monalisa24-Nov-06 5:41 
QuestionReceiving WM_DEVICECHANGE message from a console app Pin
Eberhard Fahle24-Nov-06 5:31
Eberhard Fahle24-Nov-06 5:31 
AnswerRe: Receiving WM_DEVICECHANGE message from a console app Pin
djlove24-Nov-06 7:41
djlove24-Nov-06 7:41 
QuestionCode Analysis, Thread optimization Pin
Jon Hulatt24-Nov-06 4:41
Jon Hulatt24-Nov-06 4:41 
AnswerRe: Code Analysis, Thread optimization Pin
Amar Chaudhary24-Nov-06 4:47
Amar Chaudhary24-Nov-06 4:47 
GeneralRe: Code Analysis, Thread optimization Pin
Nadia Monalisa24-Nov-06 9:53
Nadia Monalisa24-Nov-06 9:53 

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.