Browsing 7239 questions and answers with Jon Skeet
It sounds like you want to create a sequence of student/mark pairs, and then group by the mark: var studentsByMark = from student in students from mark in student.ExamScores group student by... more 12/7/2015 4:31:10 PM
I would normally have a property with the same type as you want to expose with the getter, and then have additional SetBody methods. So potentially: private JObject body; public string Body { get { return body.ToString(); } set {... more 12/7/2015 12:58:16 PM
Firstly, GetDaylightChanges is accurate - the clocks did go back in Sweden at 3am local time. Secondly, that doesn't mean that you've shown a bug anywhere in the BCL. The problem is simply that 02:00:00 occurs twice - once before the... more 12/7/2015 9:25:44 AM
You haven't modified the document. You've asked the document for a string representation of itself, then assigned a new string to the same variable - but that doesn't change the XML in the document at all. I would strongly urge you to use... more 12/7/2015 8:33:16 AM
Yes, you're modifying the UI (indirectly, through the ObservableCollection<>) on a non-UI thread. You're not allowed to do that. I suspect you should find an exception being thrown giving that detail, although it may not be easy to... more 12/7/2015 7:18:56 AM
Basically, you shouldn't be using ObjectOutputStream if you're just trying to send text. That's not what it's for. ObjectOutputStream performs binary serialization in a Java-specific format, of arbitrary serializable objects. It should... more 12/7/2015 6:59:29 AM
This is the problem: Console.WriteLine("Decimal value Converted: " + moneyConversion); //-34555.897 You're using moneyConversion (the decimal value) rather than moneyConversionString. If you change it to: Console.WriteLine("Decimal... more 12/5/2015 11:32:03 PM
There are various separate ideas you need to understand here. Most importantly, there's the idea of an anonymous type. Look at this: var x = new { Name = "Jon", Location = "Reading" }; That has created an instance of an anonymous type,... more 12/4/2015 11:48:30 AM
The problem is that you've got the extra "layer" between the result property and the object with Random and Random2. It looks like you want something like: class ReadRandomResult { public Dictionary<string, ReadRandom> Result {... more 12/4/2015 9:31:21 AM
There are four problems here: You have to use ref on the argument as well as the parameter The expression o[i] - offset is classified as a value rather than a variable, so you can't pass it by reference Even the expression o[i] would be... more 12/4/2015 7:29:14 AM