using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication17 { public delegate string testDelegate(string a, int b); class Program { static void Main(string[] args)…
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MyDelegate { class Program { static void Main(string[] args) { List<User> users = GetUsers(); //1.传统方式实例化委托实例 users = users.OrderBy(new Func<User, int…
一般复杂的ListView都会重写BaseAdapter,通过重用convertView来减少inflate,通过setTag()和ViewHolder改变ItemView的内容. 重写BaseAdapter必须要实现 public int getCount() public Object getItem(int position) public View getView(int position, View convertView, ViewGroup parent) 这三个函数. 补充一下L…