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

C#

 
GeneralRe: System.OutOfMemory Exception Pin
Christian Graus4-May-08 19:09
protectorChristian Graus4-May-08 19:09 
GeneralRe: System.OutOfMemory Exception Pin
Luc Pattyn4-May-08 23:25
sitebuilderLuc Pattyn4-May-08 23:25 
QuestionHow to connect and disconnect internet ,via an internet gatewaye connection using C# Pin
pejman4-May-08 12:55
pejman4-May-08 12:55 
QuestionWindows Context Menu Problem Pin
Arthur Hylton4-May-08 12:07
Arthur Hylton4-May-08 12:07 
AnswerRe: Windows Context Menu Problem Pin
Christian Graus4-May-08 12:21
protectorChristian Graus4-May-08 12:21 
AnswerRe: Windows Context Menu Problem Pin
Luc Pattyn4-May-08 12:27
sitebuilderLuc Pattyn4-May-08 12:27 
Question[Message Deleted] [modified] Pin
Lord President4-May-08 10:06
Lord President4-May-08 10:06 
AnswerRe: Open and Save File dialogs Pin
Gareth H4-May-08 10:27
Gareth H4-May-08 10:27 
GeneralRe: Open and Save File dialogs Pin
Lord President4-May-08 10:33
Lord President4-May-08 10:33 
GeneralRe: Open and Save File dialogs Pin
Gareth H4-May-08 10:35
Gareth H4-May-08 10:35 
GeneralRe: Open and Save File dialogs [modified] Pin
Lord President4-May-08 10:38
Lord President4-May-08 10:38 
GeneralRe: [Message Deleted] Pin
Guffa4-May-08 21:57
Guffa4-May-08 21:57 
QuestionEmedded Scripting Languages Pin
martin_hughes4-May-08 8:19
martin_hughes4-May-08 8:19 
AnswerRe: Emedded Scripting Languages Pin
Uwe Keim4-May-08 8:35
sitebuilderUwe Keim4-May-08 8:35 
GeneralRe: Emedded Scripting Languages Pin
martin_hughes4-May-08 8:43
martin_hughes4-May-08 8:43 
Questionwork with a large amount of precalculated data Pin
chris9974-May-08 7:34
chris9974-May-08 7:34 
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 

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.