Browsing 7239 questions and answers with Jon Skeet
I strongly suspect that this is the problem: public Dao(Class<?> classe) { this.entity = (E) classe; } You're effectively casting Usuario.class to Usuario. That's not right. The class and an instance of the class are different... more 5/20/2014 11:55:22 AM
I suspect the problem is that if Attributes["SomeAttribute"] return null - so finding the Value property will fail. If column is an XmlElement, that would certainly be the case - look at the XmlAttributeCollection.ItemOf(string) property... more 5/20/2014 6:16:49 AM
Just pass in the delegate you want to use to subscribe to the event, as well: // I can't find the docs for ListViewItem.Tapped right now - adjust the // type of the "handler" parameter to match the event public void CreateItem(string... more 5/20/2014 6:11:22 AM
Not sure why only then I see it and not before writing it. Because until that constraint exists, the compiler has no idea what members are available on T, other than those which are present as part of object. You wouldn't expect to be... more 5/19/2014 5:02:48 PM
Note: please do not treat this as an "official answer from Google". Although I work at Google, I don't work on the Drive API. I've reproduced the problem, and reported it to the Drive API team, who may be able to provide more details. In... more 5/19/2014 4:13:55 PM
This is the problem - or at least a problem: new File(groovyUtils.projectPath + "//file1.pdf").text You're loading a binary file as if it's text. It's not. Don't read it as text and then convert it to byte - use byte[] pdfBytes = new... more 5/19/2014 3:01:46 PM
There's an overload of Convert.ToInt32 which accepts object. There's no such overload for int.Parse. The argument must be a string at compile time. You would need: shopify.setVendor(int.Parse(reader["ProductID"].ToString()), ... more 5/19/2014 2:03:15 PM
The most immediate problem is here: if (total > higher) { higher = total; c++; } By incrementing c you're just remembering how many cities had a larger population than any of the preceding ones. You want to remember the index... more 5/19/2014 1:32:57 PM
I realized lamba is not supported by .net 2.0 That's not true. You can use lambda expressions to create delegates in .NET 2.0 with no problem. You need a C# 3 compiler (or later), that's all - it's a compile-time transformation which... more 5/19/2014 12:30:15 PM
The difference is that in the first version, you're declaring a variable and then capturing the variable in the lambda expression. The variable itself "survives" across multiple invocations of the delegate. In the second example, you're... more 5/19/2014 12:19:55 PM