Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
AnswerRe: struct X class Pin
Judah Gabriel Himango11-Sep-08 13:00
sponsorJudah Gabriel Himango11-Sep-08 13:00 
AnswerRe: struct X class Pin
Christian Graus11-Sep-08 15:15
protectorChristian Graus11-Sep-08 15:15 
GeneralRe: struct X class Pin
Dirso11-Sep-08 15:37
Dirso11-Sep-08 15:37 
GeneralRe: struct X class Pin
Judah Gabriel Himango11-Sep-08 17:27
sponsorJudah Gabriel Himango11-Sep-08 17:27 
GeneralRe: struct X class Pin
Dirso12-Sep-08 0:11
Dirso12-Sep-08 0:11 
AnswerRe: struct X class Pin
Guffa11-Sep-08 20:52
Guffa11-Sep-08 20:52 
GeneralRe: struct X class Pin
Dirso12-Sep-08 0:13
Dirso12-Sep-08 0:13 
GeneralRe: struct X class Pin
Guffa12-Sep-08 2:32
Guffa12-Sep-08 2:32 
Dirso wrote:
Performance could be an issue here, so if struct is faster I'll go for it.


If you have an array of the type, a structure uses less memory, which can improve performance a bit. A struct is faster for some operations, but you have to keep it smaller than 16 bytes to be efficient.

Dirso wrote:
about change values I'll try to use "out"/"ref" parameters everytime, right?


That doesn't help, as you would still change the vales of a copy, which doesn't affect the original.

A structure should be immutable, i.e. you assign the values when you create the instance, and if you want to change a value you create a new instance. That way the structure instance works as a single value, which is the intention of the structure concept.

Despite everything, the person most likely to be fooling you next is yourself.

Questionwhich database is installed on every computer Pin
Deresen11-Sep-08 12:03
Deresen11-Sep-08 12:03 
AnswerRe: which database is installed on every computer Pin
Pete O'Hanlon11-Sep-08 12:25
mvePete O'Hanlon11-Sep-08 12:25 
AnswerRe: which database is installed on every computer Pin
Eslam Afifi11-Sep-08 12:35
Eslam Afifi11-Sep-08 12:35 
GeneralRe: which database is installed on every computer Pin
Member 204889411-Sep-08 14:05
Member 204889411-Sep-08 14:05 
AnswerRe: which database is installed on every computer Pin
Paul Conrad11-Sep-08 12:49
professionalPaul Conrad11-Sep-08 12:49 
AnswerRe: which database is installed on every computer Pin
Giorgi Dalakishvili12-Sep-08 0:49
mentorGiorgi Dalakishvili12-Sep-08 0:49 
QuestionOpen Another Application from a Windows Form Pin
polishprogrammer11-Sep-08 11:30
polishprogrammer11-Sep-08 11:30 
AnswerRe: Open Another Application from a Windows Form Pin
Pete O'Hanlon11-Sep-08 11:53
mvePete O'Hanlon11-Sep-08 11:53 
AnswerRe: Open Another Application from a Windows Form Pin
Eslam Afifi11-Sep-08 11:58
Eslam Afifi11-Sep-08 11:58 
QuestionHow do I programatically select a Tab Page? Pin
postonoh11-Sep-08 10:52
postonoh11-Sep-08 10:52 
AnswerRe: How do I programatically select a Tab Page? Pin
Pete O'Hanlon11-Sep-08 11:21
mvePete O'Hanlon11-Sep-08 11:21 
GeneralRe: How do I programatically select a Tab Page? Pin
postonoh11-Sep-08 11:26
postonoh11-Sep-08 11:26 
GeneralRe: How do I programatically select a Tab Page? Pin
Pete O'Hanlon11-Sep-08 11:44
mvePete O'Hanlon11-Sep-08 11:44 
GeneralRe: How do I programatically select a Tab Page? Pin
postonoh11-Sep-08 13:35
postonoh11-Sep-08 13:35 
GeneralRe: How do I programatically select a Tab Page? Pin
Member 204889411-Sep-08 14:50
Member 204889411-Sep-08 14:50 
Questiontypedef?? Pin
Dirso11-Sep-08 10:08
Dirso11-Sep-08 10:08 
AnswerI am unaware of that functionality in C# Pin
Ennis Ray Lynch, Jr.11-Sep-08 10:18
Ennis Ray Lynch, Jr.11-Sep-08 10:18 

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.