Browsing 7239 questions and answers with Jon Skeet
I'm not aware of an existing operator to do this in LINQ to Objects itself, more the MoreLINQ project has the Split method, so you can use: var sections = originalList.Split("-----"); That returns an... more 9/23/2014 4:19:51 PM
The immediate problem (the reason you're seeing System.Xml.XmlElement) is that you're calling ToString on an XmlElement, which doesn't override that method. You probably want to use the InnerXml or OuterXml properties instead: XmlNode... more 9/23/2014 3:07:29 PM
You'd basically have to convert it to a pair of methods: public Unit[] getUnits() { // Method body } public void setUnits(Unit[] value) { // Method body } Java doesn't have properties at a language level - the above is... more 9/23/2014 11:29:11 AM
Is there a simple way to achieve the goal? Almost certainly not. Like using DateTime.ParseExact and somehow specifying that an Oracle date format is used? No - .NET doesn't know about the Oracle date/time format. Converting... more 9/23/2014 9:16:11 AM
This sounds like a perfect job for either an actors framework, or possibly TPL Dataflow. Fundamentally you've got one actor (or block) for each job, waiting for messages and processing them independently of the other actors. In either... more 9/22/2014 4:47:39 PM
Your DateTime is actually not in UTC - it's in the system default time zone. To fix it, you just need to tell it that the value you're passing in is in UTC: DateTime dt = new DateTime("2014-09-15T21:20:14",... more 9/22/2014 3:04:08 PM
No, you don't need to do anything. The thread will just finish when it has no more work to do. You might want to consider scheduling it to execute on the thread pool however, instead of creating a new thread each time. You could do that... more 9/22/2014 11:05:25 AM
If you need to operate in the dispatcher thread, then you really don't want to use Thread.Sleep - you'd end up blocking the dispatcher thread, so your user interface would be frozen. You could have a background thread sleeping for 20... more 9/22/2014 9:25:57 AM
Any of these can be a subclass. For example: public class Superclass { } public abstract class AbstractSubclass extends Superclass { } public class MiddleClass extends Superclass { } public class BottomClass extends MiddleClass... more 9/21/2014 3:38:22 PM
The problem is just %2d - you've explicitly asked for the number of seconds to be converted into a minimum of two characters. Just make it %d and it should be fine. See the Formatter documentation for details. Note that at the moment, if... more 9/20/2014 3:19:28 PM