Click here to Skip to main content
15,914,924 members
Home / Discussions / C#
   

C#

 
GeneralRe: Optional field selection SQL Pin
WillemM25-Jun-06 5:28
WillemM25-Jun-06 5:28 
Questionbug in HScrollBar control object Pin
3Dizard25-Jun-06 4:17
3Dizard25-Jun-06 4:17 
AnswerRe: bug in HScrollBar control object [modified] Pin
Graham Nimbley25-Jun-06 10:12
Graham Nimbley25-Jun-06 10:12 
GeneralRe: bug in HScrollBar control object Pin
3Dizard26-Jun-06 4:28
3Dizard26-Jun-06 4:28 
Questionclass or struct? Pin
Super Lloyd25-Jun-06 4:16
Super Lloyd25-Jun-06 4:16 
AnswerRe: class or struct? Pin
Jun Du25-Jun-06 4:39
Jun Du25-Jun-06 4:39 
GeneralRe: class or struct? Pin
Super Lloyd25-Jun-06 5:10
Super Lloyd25-Jun-06 5:10 
AnswerRe: class or struct? Pin
Guffa25-Jun-06 5:09
Guffa25-Jun-06 5:09 
Yes, using a struct would give you slightly less overhead, as there is one object less to create. Creating objects are not very expensive, though.

Generally a struct would only contain value types, not objects. When assigning a struct you copy all the data in it, but if it contains objects only the references will be copied. This is not consistent with how you expect a value type to work, so it might be pretty confusing.

If you want to make your code more efficient, I believe that there are other things that you could do that would increase the performance much more.


---
b { font-weight: normal; }

GeneralRe: class or struct? Pin
Super Lloyd25-Jun-06 5:12
Super Lloyd25-Jun-06 5:12 
Questionpicture box - help!! Pin
printscreen1234525-Jun-06 4:01
printscreen1234525-Jun-06 4:01 
AnswerRe: picture box - help!! Pin
Graham Nimbley25-Jun-06 10:08
Graham Nimbley25-Jun-06 10:08 
GeneralRe: picture box - help!! Pin
printscreen1234526-Jun-06 23:39
printscreen1234526-Jun-06 23:39 
AnswerRe: picture box - help!! Pin
Nader Elshehabi25-Jun-06 11:10
Nader Elshehabi25-Jun-06 11:10 
GeneralRe: picture box - help!! Pin
printscreen1234527-Jun-06 3:20
printscreen1234527-Jun-06 3:20 
GeneralRe: picture box - help!! Pin
Nader Elshehabi27-Jun-06 11:17
Nader Elshehabi27-Jun-06 11:17 
Questionhow to decrypt encryption video in stream and play it ? Pin
hdv21225-Jun-06 3:24
hdv21225-Jun-06 3:24 
QuestionBit of design advice needed Pin
relaeir25-Jun-06 2:02
relaeir25-Jun-06 2:02 
AnswerRe: Bit of design advice needed [modified] Pin
Graham Nimbley25-Jun-06 10:21
Graham Nimbley25-Jun-06 10:21 
AnswerRe: Bit of design advice needed Pin
Richard Houltz25-Jun-06 12:41
Richard Houltz25-Jun-06 12:41 
AnswerRe: Bit of design advice needed Pin
relaeir25-Jun-06 18:03
relaeir25-Jun-06 18:03 
Questionsongs off the iPod Pin
ahmedelshafee25-Jun-06 1:26
ahmedelshafee25-Jun-06 1:26 
AnswerRe: songs off the iPod Pin
Paresh Gheewala25-Jun-06 1:42
Paresh Gheewala25-Jun-06 1:42 
QuestionControls on a window Pin
XeoN-Kc25-Jun-06 1:10
XeoN-Kc25-Jun-06 1:10 
AnswerRe: Controls on a window Pin
NaNg1524125-Jun-06 2:31
NaNg1524125-Jun-06 2:31 
QuestionstatusBar help Pin
foysal mamun24-Jun-06 22:19
foysal mamun24-Jun-06 22: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.