Browsing 7239 questions and answers with Jon Skeet
You haven't included a reference to the current assembly, which is the assembly declaring Global. Therefore the compiler has no idea which type you're talking about. You need to set the ReferencedAssemblies property in the... more 12/20/2013 8:15:03 AM
You would need to store not just the events, but also the time at which you serialized. Then after deserializing, work out the difference between the current time and the serialization time, and update all the events accordingly. So... more 12/20/2013 8:02:06 AM
This answer is equivalent to that of C.Evenhuis, but uses an iterator block instead of a whole separate class: T Find(IEnumerable<T> values, Func<T, ConcreteType> map) { var dictionary = new Dictionary<ConcreteType,... more 12/19/2013 5:23:27 PM
ToString is simply called to report the expected and actual values. It's not what determines equality. That's the Equals(object) method, which you should be overriding in order to provide the equality semantics you're interested in. (You... more 12/19/2013 4:07:50 PM
When I implement the GetObjectData method, can I / should I serial this variable? Absolutely not. Even if you did write it out, it's not like you could change the value of the constant when you read it back in again. More generally,... more 12/19/2013 4:03:19 PM
what's the difference between an Abstract class with a default constructor and a class with private constructor? If there's a default constructor, it will be callable from subclasses. If it's private, you'll only be able to create... more 12/19/2013 3:15:46 PM
The saved file has around 15MB, which I think is quite a lot for only binary data. Well, a double is 8 bytes of data: The Double value type represents a double-precision 64-bit number You've got 2 million of them, so that means... more 12/19/2013 3:09:41 PM
How can I access the subscribers to PropertyChanged? You don't, basically. An event only supports subscribe and unsubscribe functionality. I've researched a bit and found that this should be possible calling GetInvocationList()... more 12/19/2013 1:04:30 PM
Well yes, this is the problem: public static XDocument GetXDocument(this OpenXmlPart part) That's not being declared within a top-level static non-generic class, which extension methods have to be. I would strongly advise you to stop... more 12/19/2013 11:27:56 AM
Holding the cursor over 'TargetDate' displays todays date 'Thu 19 December' Well that explains it. The string "Thu 19 December" is not in the form "yyyy-MM-dd" is it? You could specify a format string of "ddd dd MMMM" but that... more 12/19/2013 10:43:24 AM