Browsing 7239 questions and answers with Jon Skeet
It's not clear why you're grouping at all... and you just need to split the values and flatten that with SelectMany, by the looks of it: var separators = new[] { ';', ',' }; var r = xdoc.Descendants("TestCase") .Select(x =>... more 4/22/2014 6:10:38 AM
The problem is that you're using a stream-based protocol (TCP/IP) as if it were a message-based protocol. It's not. There are a few options here, but the simplest are: Write a delimiter after each message Write a length-prefix (the... more 4/21/2014 4:40:30 PM
The "GMT" part is confusing things - the Z format specifier expects just "0800" or similar. You can change your format to: "EEE MMM dd yyyy HH:mm:ss 'GMT'Z" and that will work. (It's ignoring the time zone name at the end of the... more 4/21/2014 10:05:09 AM
Will all the 100 allocated Birds be taken care of WITH the tree class by the garbage collector? Well, your code doesn't actually create any instances of Bird. It just creates an array, and every element of that array will be null to... more 4/21/2014 10:01:59 AM
Main objective is to convert a dd/MM/yyyy to yyyy-MM-dd "date" format to fit in SQL Don't! You should avoid string conversions as far as you possibly can. Keep your data in its natural representation for as much of the time as you... more 4/21/2014 9:44:53 AM
The problem isn't in the size of the double you're using, but the precision. A double can only store 15-16 digits of precision, even though it can hold numbers much bigger than 1016. If you want exact decimal representations - and... more 4/21/2014 9:04:22 AM
Your hash code computation and equality comparison are both based on stuck - but that can change over time. If you mutate an object after adding it as a key within a hash map, in such a way that the hash code changes, then the key will... more 4/20/2014 12:14:47 PM
You're repeated sending the same object via serialization - and ObjectOutputStream notices that, and instead resolves this to references to the same object. If you want to effectively send a separate object on each call, add this to your... more 4/19/2014 7:22:19 PM
Look carefully at your constructor: public MyModelApp(object parent) : base(parent) { IStuffs _stuffs = new MyStuffs(this); } You're declaring a local variable called _stuffs and giving it a value. That is not the same as the... more 4/19/2014 7:09:24 PM
Isn't is String referenced type? Yes, String is a reference type. So after command "a = b;" why didnt change both of variables? Because you only said to change the value of one variable at a time. This statement: b =... more 4/19/2014 6:54:10 PM