Click here to Skip to main content
15,887,975 members
Home / Discussions / C#
   

C#

 
AnswerRe: work with a large amount of precalculated data Pin
Charith Jayasundara4-May-08 7:58
Charith Jayasundara4-May-08 7:58 
GeneralRe: work with a large amount of precalculated data Pin
chris9974-May-08 11:01
chris9974-May-08 11:01 
QuestionCasting an anonymous type Pin
belzer4-May-08 6:56
belzer4-May-08 6:56 
AnswerRe: Casting an anonymous type Pin
Guffa4-May-08 8:09
Guffa4-May-08 8:09 
GeneralRe: Casting an anonymous type Pin
belzer4-May-08 10:32
belzer4-May-08 10:32 
GeneralRe: Casting an anonymous type Pin
Roger Alsing4-May-08 18:47
Roger Alsing4-May-08 18:47 
GeneralRe: Casting an anonymous type Pin
Guffa4-May-08 21:38
Guffa4-May-08 21:38 
GeneralRe: Casting an anonymous type Pin
Roger Alsing5-May-08 6:21
Roger Alsing5-May-08 6:21 
Yes its an ugly hack no doubt about it.

The strange thing about it is that:

var a = new { foo = 123 , bar = 678}
and
var b = new { foo = 777 , bar = 123}

Gives the same type.

But:
var b = new { bar = 123, foo=777}

Gives a new type, even tho the type have exactly the same members.
(the compiled class will have different constructors, ctor params are specified in the same order as the properties)

And if I recall correctly then this is a language feature because some MS guy wrote about the above as a bug, and then Eric Meijer(or some other linq guy, dont remember 100%) told him that that was the intended behaviour according to the c# specs.


QuestionIssue with Setup and Deployment Project Pin
paas4-May-08 6:05
paas4-May-08 6:05 
QuestionManipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) Pin
Jan Weltmeyer4-May-08 5:44
Jan Weltmeyer4-May-08 5:44 
AnswerRe: Manipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) Pin
Dave Kreskowiak4-May-08 15:47
mveDave Kreskowiak4-May-08 15:47 
GeneralRe: Manipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) Pin
Jan Weltmeyer5-May-08 2:45
Jan Weltmeyer5-May-08 2:45 
GeneralRe: Manipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) Pin
Dave Kreskowiak5-May-08 18:44
mveDave Kreskowiak5-May-08 18:44 
AnswerRe: Manipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) [modified] Pin
Peter Josefsson Sweden5-May-08 4:11
Peter Josefsson Sweden5-May-08 4:11 
GeneralRe: Manipulate sender ip on TCPCLIENT (port forwarding application with internal packet checks) Pin
Jan Weltmeyer5-May-08 8:04
Jan Weltmeyer5-May-08 8:04 
QuestionC# asyncallback Pin
AlexPizzano4-May-08 4:53
AlexPizzano4-May-08 4:53 
AnswerRe: C# asyncallback Pin
Judah Gabriel Himango4-May-08 7:40
sponsorJudah Gabriel Himango4-May-08 7:40 
AnswerRe: C# asyncallback Pin
Charith Jayasundara4-May-08 8:01
Charith Jayasundara4-May-08 8:01 
GeneralRe: C# asyncallback Pin
leckey4-May-08 17:29
leckey4-May-08 17:29 
AnswerRe: C# asyncallback Pin
Dave Sexton4-May-08 11:53
Dave Sexton4-May-08 11:53 
QuestionNeed to Internet chat app. Pin
hdv2124-May-08 4:48
hdv2124-May-08 4:48 
AnswerRe: Need to Internet chat app. Pin
Gareth H4-May-08 5:48
Gareth H4-May-08 5:48 
GeneralRe: Need to Internet chat app. Pin
hdv2124-May-08 5:52
hdv2124-May-08 5:52 
GeneralRe: Need to Internet chat app. Pin
Jan Weltmeyer4-May-08 6:03
Jan Weltmeyer4-May-08 6:03 
AnswerRe: Need to Internet chat app. Pin
Charith Jayasundara4-May-08 7:47
Charith Jayasundara4-May-08 7:47 

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.