Click here to Skip to main content
15,884,928 members
Home / Discussions / C#
   

C#

 
GeneralRe: timer Pin
maria_p18-Feb-04 8:53
maria_p18-Feb-04 8:53 
GeneralRe: timer Pin
Heath Stewart18-Feb-04 9:23
protectorHeath Stewart18-Feb-04 9:23 
GeneralOutlook 2003 -( Inbox look-alike) Pin
Nick_Chr14-Jan-04 6:10
Nick_Chr14-Jan-04 6:10 
GeneralRe: Outlook 2003 -( Inbox look-alike) Pin
Heath Stewart14-Jan-04 8:10
protectorHeath Stewart14-Jan-04 8:10 
GeneralRe: Outlook 2003 -( Inbox look-alike) Pin
Nick_Chr14-Jan-04 22:25
Nick_Chr14-Jan-04 22:25 
GeneralGetHashCode vs. Equals Pin
balkanese14-Jan-04 5:31
balkanese14-Jan-04 5:31 
GeneralRe: GetHashCode vs. Equals Pin
scadaguy14-Jan-04 6:26
scadaguy14-Jan-04 6:26 
GeneralRe: GetHashCode vs. Equals Pin
balkanese15-Jan-04 21:46
balkanese15-Jan-04 21:46 
I use the Unit testing framework "NUnit":
My code looks like follows:

-------------------------------------------
MyClass f = new MyClass();
MyClass _f = new MyClass();

...
some manipulation of "f" and "_f"
...

f.Matrix = _f.Matrix;
Assert.AreEqual(_f.Matrix, f.Matrix); //OK
Assert.AreEqual(_f.B, f.B); //OK
Assert.AreEqual(_f.B.GetHashCode(), f.B.GetHashCode()); //FAILS! _f hashcode is e.g. "123123123" f is "-123123123"
------------------------------------


Implementation of "MyClass":

------------------------------------
public class MyClass
{
private Frame _matrix; //"Frame" is a kind of matrix class
private double _b;
...

public Matrix
{
get
{
return _matrix;
}
set
{
_matrix = value;
syncWithMatrix(); //calculates "_b" from "_matrix"
}
}
public B
{
get
{
return _b;
}
set
{
_b = value;
syncMatrix(); //calculates "_matrix" from "_b"
}
}
}
--------------------------------

Bye,
Matej
GeneralInternet downloading problem... Pin
profoundwhispers14-Jan-04 4:26
profoundwhispers14-Jan-04 4:26 
GeneralRe: Internet downloading problem... Pin
Heath Stewart14-Jan-04 4:56
protectorHeath Stewart14-Jan-04 4:56 
GeneralRe: Internet downloading problem... Pin
Kentamanos14-Jan-04 6:35
Kentamanos14-Jan-04 6:35 
GeneralRe: Internet downloading problem... Pin
Heath Stewart14-Jan-04 7:45
protectorHeath Stewart14-Jan-04 7:45 
GeneralRe: Internet downloading problem... Pin
Kentamanos14-Jan-04 9:05
Kentamanos14-Jan-04 9:05 
Generalremoting "newbie" questions Pin
Palladino14-Jan-04 2:24
Palladino14-Jan-04 2:24 
GeneralRe: remoting "newbie" questions Pin
LongRange.Shooter14-Jan-04 3:07
LongRange.Shooter14-Jan-04 3:07 
GeneralRe: remoting "newbie" questions Pin
LongRange.Shooter14-Jan-04 3:23
LongRange.Shooter14-Jan-04 3:23 
GeneralRe: remoting "newbie" questions Pin
Palladino14-Jan-04 8:13
Palladino14-Jan-04 8:13 
GeneralRe: remoting "newbie" questions Pin
LongRange.Shooter14-Jan-04 10:46
LongRange.Shooter14-Jan-04 10:46 
GeneralRe: remoting "newbie" questions Pin
Palladino15-Jan-04 1:36
Palladino15-Jan-04 1:36 
GeneralRe: remoting "newbie" questions Pin
LongRange.Shooter15-Jan-04 2:55
LongRange.Shooter15-Jan-04 2:55 
GeneralRe: remoting "newbie" questions Pin
LongRange.Shooter15-Jan-04 3:24
LongRange.Shooter15-Jan-04 3:24 
GeneralRe: remoting "newbie" questions Pin
Palladino15-Jan-04 5:43
Palladino15-Jan-04 5:43 
GeneralDebugging Pin
jyoti doiphode13-Jan-04 23:58
jyoti doiphode13-Jan-04 23:58 
GeneralRe: Debugging Pin
Heath Stewart14-Jan-04 4:41
protectorHeath Stewart14-Jan-04 4:41 
GeneralFinding names of local user accounts Pin
EnkelIk13-Jan-04 23:46
EnkelIk13-Jan-04 23:46 

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.