Browsing 7239 questions and answers with Jon Skeet
Look at this loop: for (int i = startd.getDate() ; i<=(endd.getDate()+1);i++){ startd.setDate(i); datelist.add(startd); System.out.println(i+"--datelist ---> "+datelist.toString()); } You're adding... more 12/15/2015 7:06:47 AM
The binding time in C# depends on whether the binding involves dynamic or not. As you've seen, if you use dynamic you get execution-time overload resolution; if you don't, you get compile-time overload resolution. Note that even when... more 12/14/2015 3:51:32 PM
There's no problem here, because all the non-primary unary operators have the same precedence as each other, and a different precedence to all binary operators. Associativity comes into effect when an operand is between two operators of... more 12/14/2015 1:15:33 PM
Well the cast could easily fail. Suppose I have: public class AB : A {} B b = new B(); AB ab = b.Create<AB>(); That would end up trying to assign a B reference to a variable of type AB. Those are incompatible. It sounds like you... more 12/14/2015 1:10:33 PM
Fundamentally, each enum type either is designed to have be a bit mask, or isn't. Options you might consider: Two separate enums, as per your code One non-flags enum, but make A.Property a List<MyEnum> or similar One flags enum,... more 12/14/2015 1:09:15 PM
No, a List<string> isn't a List<object>... although it is an IEnumerable<object> due to generic covariance. However, a List<int> isn't even an IEnumerable<object> as covariance doesn't apply to value type type... more 12/14/2015 7:13:53 AM
It sounds like you don't actually want command line arguments, but environment variables - and you can use env for that: - name: appContainer1 image: gcr.io/mybucket/appContainerImage1 ports: - containerPort: 8080 env: -... more 12/12/2015 10:33:45 AM
Well yes - you're not waiting for the async operation to actually finish. You should declare the method to return Task instead, like this: static async Task GetPageHtml(string _url) and then wait for it in your Main... more 12/12/2015 9:38:45 AM
dont want content to change in cloned list if something is changed in main list. That sounds like you want a deep clone, basically. In other words, creating a new list where each element is a copy of an element in the original list,... more 12/11/2015 7:58:17 PM
This gives me a compiler warning at pc.CategoryId == null saying it will always be false as CategoryId is not nullable. But because of left outer join it comes as null from database. No, pc might be null - but pc.CategoryId would... more 12/11/2015 7:45:10 PM