Click here to Skip to main content
15,896,727 members
Home / Discussions / C#
   

C#

 
AnswerRe: self-initializing static list of instances of a struct within the definition of the struct: I though this was illegal Pin
Luc Pattyn11-Dec-11 16:14
sitebuilderLuc Pattyn11-Dec-11 16:14 
GeneralRe: self-initializing static list of instances of a struct within the definition of the struct Pin
BillWoodruff11-Dec-11 17:06
professionalBillWoodruff11-Dec-11 17:06 
AnswerRe: self-initializing static list of instances of a struct within the definition of the struct Pin
Luc Pattyn11-Dec-11 17:21
sitebuilderLuc Pattyn11-Dec-11 17:21 
AnswerRe: self-initializing static reference types within the definition of the struct ? Pin
DaveyM6911-Dec-11 22:52
professionalDaveyM6911-Dec-11 22:52 
GeneralRe: self-initializing static reference types within the definition of the struct ? Pin
BillWoodruff12-Dec-11 11:41
professionalBillWoodruff12-Dec-11 11:41 
GeneralRe: self-initializing static reference types within the definition of the struct ? Pin
BobJanova13-Dec-11 23:19
BobJanova13-Dec-11 23:19 
GeneralRe: self-initializing static reference types within the definition of the struct ? Pin
DaveyM6914-Dec-11 1:46
professionalDaveyM6914-Dec-11 1:46 
GeneralRe: self-initializing static reference types within the definition of the struct ? Pin
BobJanova14-Dec-11 3:48
BobJanova14-Dec-11 3:48 
Nice link. And I think 'cast' is the word you want; if it's a value type then you don't need to bother with the null check anyway since a null can never be passed.

So basically it makes no difference as long as they've improved the compiler since .Net 2, which didn't inline ReferenceEquals calls. And yeah, any overhead is trivial and of academic interest only, but that's fun to think about sometimes.
QuestionWorking On Communication Protocols Pin
AmbiguousName11-Dec-11 6:12
AmbiguousName11-Dec-11 6:12 
AnswerRe: Working On Communication Protocols Pin
Addy Tas11-Dec-11 9:08
Addy Tas11-Dec-11 9:08 
AnswerRe: Working On Communication Protocols Pin
AmbiguousName11-Dec-11 10:01
AmbiguousName11-Dec-11 10:01 
GeneralRe: Working On Communication Protocols Pin
Matty2211-Dec-11 14:17
Matty2211-Dec-11 14:17 
GeneralRe: Working On Communication Protocols Pin
jschell12-Dec-11 8:42
jschell12-Dec-11 8:42 
GeneralRe: Working On Communication Protocols Pin
Addy Tas12-Dec-11 10:46
Addy Tas12-Dec-11 10:46 
GeneralRe: Working On Communication Protocols Pin
BobJanova13-Dec-11 23:22
BobJanova13-Dec-11 23:22 
AnswerRe: Working On Communication Protocols Pin
Eddy Vluggen11-Dec-11 12:32
professionalEddy Vluggen11-Dec-11 12:32 
JokeRe: Working On Communication Protocols Pin
Peter_in_278011-Dec-11 13:33
professionalPeter_in_278011-Dec-11 13:33 
GeneralRe: Working On Communication Protocols Pin
Eddy Vluggen12-Dec-11 6:04
professionalEddy Vluggen12-Dec-11 6:04 
Questionconflict of interest, COI...in systemwatcher and stream reader... Pin
beh760610-Dec-11 23:34
beh760610-Dec-11 23:34 
AnswerRe: conflict of interest, COI...in systemwatcher and stream reader... Pin
Eddy Vluggen11-Dec-11 12:26
professionalEddy Vluggen11-Dec-11 12:26 
AnswerRe: conflict of interest, COI...in systemwatcher and stream reader... Pin
Luc Pattyn11-Dec-11 13:10
sitebuilderLuc Pattyn11-Dec-11 13:10 
GeneralRe: conflict of interest, COI...in systemwatcher and stream reader... Pin
beh760611-Dec-11 15:48
beh760611-Dec-11 15:48 
Questionregular expressions groups Pin
benams10-Dec-11 22:20
benams10-Dec-11 22:20 
AnswerRe: regular expressions groups Pin
OriginalGriff11-Dec-11 0:50
mveOriginalGriff11-Dec-11 0:50 
AnswerRe: regular expressions groups Pin
PIEBALDconsult11-Dec-11 8:18
mvePIEBALDconsult11-Dec-11 8: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.