Browsing 7239 questions and answers with Jon Skeet
CS0168 isn't part of Code Analysis - it's a simple C# compiler warning. That's got nothing to do with any later code analysis. To disable it in project properties, go into the project properties, the Build tab, Errors and Warnings... more 2/12/2014 7:53:59 AM
I don't know that there's any way to ask the ListBox to evaluate the ValueMember for you in that way... and because you're using an anonymous type, it becomes harder to get the value. Options: Use a named type instead, and cast each... more 2/12/2014 7:30:43 AM
Assuming you're using Java 7, you should be able to use this syntax: catch (StaleElementReferenceException | NoSuchElementException e) Note the single |, as well as the single variable name. See the "Catching Multiple Exception Types... more 2/12/2014 7:15:01 AM
This means there is an empty "default" in every switch or something? Sort of. If no case matches the specified value, and there's no default case, nothing happens - it's as simple as that. From section 14.11 of the JLS: If no... more 2/11/2014 8:49:04 PM
You're overloading the method, not overriding it. Overloads are chosen at compile time, and when the compile-time type of a is Animal, then a call to a.info("test") can only resolve to the info(Object) method in Animal. If you want to... more 2/11/2014 7:26:43 PM
You seem to be under the impression that a Date object has a format. It doesn't. It sounds like you just need this: Date date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss").parse(fieldAsString); (You should consider specifying a locale... more 2/11/2014 7:20:26 PM
You can't use the first form, because it's not properly overriding the method. If you could do that, imagine this code: public class C : A<DerivedZ> {} A<DerivedZ> x = new B(); x.GetZ(new C()); That should work fine, after... more 2/11/2014 7:16:03 PM
it looks like the streamreader is not able to write this content back to disk even if we tried different encoding settings. Yes, because a tgz file isn't plain text. StreamReader and StreamWriter are for text content, not arbitrary... more 2/11/2014 6:04:22 PM
No. Xamarin.Android and Xamarin.iOS expose the UI of the relevant platforms - you can't just use WPF on them. However, if you separate out your "business logic" from the UI logic in your application, you may well be able to use the same... more 2/11/2014 6:02:34 PM
It sounds like you're looking at movieNumber from your other class, which isn't appropriate. I would write it like this: import java.util.concurrent.atomic.AtomicInteger; public class Ticket { private static final AtomicInteger... more 2/11/2014 5:31:59 PM