Click here to Skip to main content
14,430,522 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
 
GeneralRe: Done with spinners Pin
Cp-Coder8-Dec-19 10:35
MemberCp-Coder8-Dec-19 10:35 
GeneralRe: Done with spinners Pin
Nelek8-Dec-19 12:16
protectorNelek8-Dec-19 12:16 
GeneralRe: Done with spinners Pin
Cp-Coder8-Dec-19 13:21
MemberCp-Coder8-Dec-19 13:21 
GeneralRe: Done with spinners Pin
Nelek8-Dec-19 21:20
protectorNelek8-Dec-19 21:20 
GeneralRe: Done with spinners Pin
dandy729-Dec-19 6:15
Memberdandy729-Dec-19 6:15 
GeneralRe: Done with spinners Pin
Mark_Wallace8-Dec-19 13:47
MemberMark_Wallace8-Dec-19 13:47 
GeneralRe: Done with spinners Pin
Daniel Pfeffer8-Dec-19 22:35
professionalDaniel Pfeffer8-Dec-19 22:35 
RantThanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 5:03
mvahoney the codewitch8-Dec-19 5:03 
Okay so I was kind of surprised this compiled:
if (null == default(T)) _array[_head] = default(T);


Where T is a generic type parameter

The reason I thought it wouldn't is because T can be a value type.

It's too bad I don't know if that operation boxes or not. It's kind of important. Now I have to disassemble just to know the spec on it. You should never have to do that, especially for a language that is supposed to be standardized, because if there's no standard for that behavior then different implementations are free to implement it how they like.

Maybe it's in the spec and it got buried, but I can't find it to save my life. Grrr.

Edit: Yes, it causes the default(T) to be boxed D'Oh! | :doh: (at least in MS's DNF implementation)
When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.


modified 8-Dec-19 10:12am.

GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
OriginalGriff8-Dec-19 5:57
communityengineerOriginalGriff8-Dec-19 5:57 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 5:59
mvahoney the codewitch8-Dec-19 5:59 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Afzaal Ahmad Zeeshan8-Dec-19 7:39
mvaAfzaal Ahmad Zeeshan8-Dec-19 7:39 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 7:42
mvahoney the codewitch8-Dec-19 7:42 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Sander Rossel8-Dec-19 9:17
professionalSander Rossel8-Dec-19 9:17 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 9:18
mvahoney the codewitch8-Dec-19 9:18 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Sander Rossel8-Dec-19 9:37
professionalSander Rossel8-Dec-19 9:37 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 9:42
mvahoney the codewitch8-Dec-19 9:42 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Sander Rossel8-Dec-19 10:35
professionalSander Rossel8-Dec-19 10:35 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 10:36
mvahoney the codewitch8-Dec-19 10:36 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Sander Rossel8-Dec-19 10:45
professionalSander Rossel8-Dec-19 10:45 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
PIEBALDconsult8-Dec-19 9:19
professionalPIEBALDconsult8-Dec-19 9:19 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
Dave Kreskowiak8-Dec-19 9:48
mveDave Kreskowiak8-Dec-19 9:48 
GeneralRe: Thanks once again Microsoft, this time for not documenting C#/.NET behavior Pin
honey the codewitch8-Dec-19 9:58
mvahoney the codewitch8-Dec-19 9:58 
GeneralThis is why I don't talk to people... Pin
Sander Rossel8-Dec-19 2:39
professionalSander Rossel8-Dec-19 2:39 
GeneralRe: This is why I don't talk to people... Pin
Cp-Coder8-Dec-19 2:55
MemberCp-Coder8-Dec-19 2:55 
GeneralRe: This is why I don't talk to people... Pin
Sander Rossel8-Dec-19 3:08
professionalSander Rossel8-Dec-19 3:08 

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.