Browsing 7239 questions and answers with Jon Skeet
Try adding a Thread.sleep(1000); call within your run() method... Basically it's the difference between scheduling something based on when the previous execution ends and when it (logically) starts. For example, suppose I schedule an... more 7/9/2014 9:26:26 AM
While that will compile, it will throw an exception at execution time. The two types just aren't compatible. A similar situation would be: uint[] uintArray = { 1, 2, 3, 4 }; int[] intArray = (int[]) (object) uintArray; That will work -... more 7/9/2014 9:14:58 AM
Just use the newer style of asynchrony: using (var response = (HttpWebResponse) await request.GetResponseAsync()) { ... } You shouldn't need to call BeginXXX much now - certainly the Microsoft APIs have pretty universally added... more 7/9/2014 9:12:22 AM
Fundamentally I think you want to avoid using List<object> at all. You should just create the array of the right size: IList dest = Array.CreateInstance(ek, sourceList.Count); for (int i = 0; i < sourceList.Count; i++) { ... more 7/9/2014 8:58:09 AM
Well, the result of the line of code you've given is a DateTimeZone. That has a MinOffset and a MaxOffset, but that's a different matter. You can find out the current standard and wall offset using: IClock clock = // some clock, e.g.... more 7/9/2014 7:31:53 AM
I'm not sure what endianness "Unicode" gives, but you should try "UTF-16BE" and "UTF-LE" - obviously BE is Big Endian, and LE is Little Endian. (Just which byte comes first in each 16-bit code unit.) (I've just read that "UTF-16" defaults... more 7/8/2014 5:38:31 PM
You need to explicitly use the Persian calendar. For example: var calendar = CalendarSystem.GetPersianCalendar(); var zone = DateTimeZoneProviders.Tzdb["Europe/London"]; var now = SystemClock.Instance.Now.InZone(zone, calendar); // Now... more 7/8/2014 5:25:42 PM
Given the name, I'd expect Path.GetExtension to work for you, if you're using the .NET "view" of WinRT. (I don't know if there's a direct equivalent in WinRT itself. Looking now.) more 7/8/2014 5:10:29 PM
Do I get the error because both classes are extending each other and both are superclasses ? No, that would be impossible at the language level. It wouldn't compile. However, if creating a Player requires creating a Hole, which... more 7/8/2014 4:44:40 PM
It sounds like you do have the assembly - just not the namespace-qualified type name. You can fetch all the types in the assembly, and get the type from that: var type = typeof(IAssessmentObject).Assembly ... more 7/8/2014 3:19:28 PM