Click here to Skip to main content
15,894,720 members
Home / Discussions / C#
   

C#

 
AnswerRe: how to configure msdn in my vs2005 correctly ? Pin
Ed.Poore13-Jan-07 7:54
Ed.Poore13-Jan-07 7:54 
AnswerRe: how to configure msdn in my vs2005 correctly ? Pin
Thomas Stockwell13-Jan-07 16:30
professionalThomas Stockwell13-Jan-07 16:30 
QuestionPrimitive types or object types what to prefer Pin
ComCoderCsharp13-Jan-07 7:21
ComCoderCsharp13-Jan-07 7:21 
AnswerRe: Primitive types or object types what to prefer Pin
Stefan Troschuetz13-Jan-07 8:30
Stefan Troschuetz13-Jan-07 8:30 
AnswerRe: Primitive types or object types what to prefer Pin
Luc Pattyn13-Jan-07 8:50
sitebuilderLuc Pattyn13-Jan-07 8:50 
GeneralRe: Primitive types or object types what to prefer Pin
ComCoderCsharp13-Jan-07 10:51
ComCoderCsharp13-Jan-07 10:51 
GeneralRe: Primitive types or object types what to prefer Pin
Kevin McFarlane13-Jan-07 11:26
Kevin McFarlane13-Jan-07 11:26 
GeneralRe: Primitive types or object types what to prefer Pin
Scott Dorman14-Jan-07 3:38
professionalScott Dorman14-Jan-07 3:38 
I'm not sure I completely follow your reasoning here. The native data types like int, byte, datetime, etc. are all structs. A struct automatically inherits from System.ValueType. If I were implementing a ComplexNumber object, I would want it to have the same behavior as the native data types.

A struct also allows you to overload operators, so there would be no problems implementing code like c = a + b. Also, if the code is going to be creating a lot of these types of objects, which it sounds like it would be, you don't want the extra overhead of creating a class each time and having to store it on the heap.

I would take a look at how one of the native data types are defined using either reflector or Rotor and pattern the object from that.

-----------------------------
In just two days, tomorrow will be yesterday.

GeneralRe: Primitive types or object types what to prefer Pin
Luc Pattyn14-Jan-07 3:55
sitebuilderLuc Pattyn14-Jan-07 3:55 
GeneralRe: Primitive types or object types what to prefer Pin
Scott Dorman14-Jan-07 4:15
professionalScott Dorman14-Jan-07 4:15 
GeneralRe: Primitive types or object types what to prefer Pin
ComCoderCsharp14-Jan-07 4:54
ComCoderCsharp14-Jan-07 4:54 
GeneralRe: Primitive types or object types what to prefer Pin
Scott Dorman14-Jan-07 5:18
professionalScott Dorman14-Jan-07 5:18 
GeneralRe: Primitive types or object types what to prefer Pin
ComCoderCsharp14-Jan-07 5:41
ComCoderCsharp14-Jan-07 5:41 
GeneralRe: Primitive types or object types what to prefer Pin
Scott Dorman14-Jan-07 5:47
professionalScott Dorman14-Jan-07 5:47 
AnswerRe: Primitive types or object types what to prefer Pin
Luc Pattyn14-Jan-07 12:14
sitebuilderLuc Pattyn14-Jan-07 12:14 
QuestionC# or C++ and why ? Pin
Software_Specialist13-Jan-07 5:54
Software_Specialist13-Jan-07 5:54 
AnswerRe: C# or C++ and why ? Pin
Ed.Poore13-Jan-07 7:56
Ed.Poore13-Jan-07 7:56 
AnswerRe: C# or C++ and why ? Pin
Colin Angus Mackay13-Jan-07 9:20
Colin Angus Mackay13-Jan-07 9:20 
GeneralRe: C# or C++ and why ? Pin
Software_Specialist13-Jan-07 22:43
Software_Specialist13-Jan-07 22:43 
GeneralRe: C# or C++ and why ? Pin
Nadia Monalisa13-Jan-07 23:45
Nadia Monalisa13-Jan-07 23:45 
GeneralRe: C# or C++ and why ? Pin
Colin Angus Mackay14-Jan-07 3:26
Colin Angus Mackay14-Jan-07 3:26 
QuestionA user-interface question Pin
Zerox MXI13-Jan-07 1:59
Zerox MXI13-Jan-07 1:59 
AnswerRe: A user-interface question Pin
Thomas Stockwell13-Jan-07 5:23
professionalThomas Stockwell13-Jan-07 5:23 
QuestionSomething like chat Pin
CodeItWell13-Jan-07 0:21
CodeItWell13-Jan-07 0:21 
AnswerRe: Something like chat Pin
Thomas Stockwell13-Jan-07 5:24
professionalThomas Stockwell13-Jan-07 5:24 

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.