在有@Override方法上面会报错如下: The method oncreate(Bundle) of type HelloWorld must override or implement a supertype method Override是指子类继承父类里面的方法的描述,说明. Override是JDK5 就已经有了,但有个Bug,就是不支持对接口的实现,认为这不是Override而JDK6 修正了这个Bug,无论是对父类的方法覆盖还是对接口的实现都可以加上@Override 修改方法:…
声明类型为泛型. 说明传递的参数为泛型,而不仅仅是一种类型. public void aa<T>(T a) { Console.WriteLine(a); } 调用时可写: this.aa<int>(5); this.aa(string)("aaaa"); C#变量类型后面加?是什么意思? 例如:int? id = null;string? name = null;还有如: public int?[] InsertTest(int? parentId, stri…
1.扩展方法 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Linq.Expressions; using System.Reflection; namespace Utils { //http://stackoverflow.com/questions/567963/linq-expression-to-return-property-value…