Browsing 7239 questions and answers with Jon Skeet
You need to differentiate between the space required for the variable and the space required for the object. Bear in mind that the value of the variable is just a reference - very much like a pointer in C++. So if you have: Object x =... more 4/14/2015 5:25:09 PM
Two problems: You're not rewinding the MemoryStream after saving to it You're calling Speak before you set the output You're also not using using statements - but that's not causing this issue. I haven't used this SDK myself, but I'd... more 4/14/2015 2:25:49 PM
m_ToInvoke() is just C# syntactic sugar for m_ToInvoke.Invoke() m_ToInvoke.Invoke() executes the delegate synchronously, in the same thread m_ToInvoke.BeginInvoke() schedules the delegate for invocation in a thread-pool thread; the... more 4/14/2015 2:12:39 PM
Given a type parameter which is a Nullable<>, how can I create an instance of that type which has HasValue = false? If you want a method with a signature of object, you just return null: //type is guaranteed to be implement... more 4/14/2015 12:20:08 PM
Two problems here: string.Length gives you the number of characters in each string, whereas FileInfo.Length gives you the number of bytes. Those can be very different things, depending on the characters and the encoding used You're not... more 4/14/2015 8:33:03 AM
Yes, you need to escape the < - in XML it's <. So this would be valid: /// \f[ /// T_{max}<30 /// \f] Now I don't know how doxygen handles comments in C# - if it really wants the original form, because it's not... more 4/14/2015 7:40:57 AM
Before the question changed (Originally the link table had a reference to the pet, not an ID.) It looks to me like you only need one join, because you can just use the Pet property from the link, where there is one: var query = from... more 4/14/2015 6:23:36 AM
Or does GC do it automaticly and I shouldn't even bother about it. This. Unless you have unmanaged resources (either directly or by way of a reference to something else which is disposable), you almost certainly shouldn't implement... more 4/13/2015 1:43:41 PM
It implements the interface, therefore the code should have compiled fine. No, because the type argument is being inferred as BooleanEnum - and a List<BooleanEnum> isn't a List<StringRepresentation>... you can add... more 4/13/2015 12:11:49 PM
I suspect you should just pass the time zone to toGregorianCalendar. I'd also strongly recommend using full time zone IDs rather than abbreviations - after all, I suspect you really want Eastern time (EST and EDT) rather than just... more 4/13/2015 8:24:56 AM