public void Init() { m_DataChangeCallBackInfoPool.Init(null, null); StrList strlist = new StrList(); strlist.Add(string.Empty); strlist.Sort((a, b) => a.CompareTo(b)); List <int> intlist = new List <int>(); intlist.Add(1); intlist.Sort((a, b) => a.CompareTo(b)); int aa = null != strlist ? strlist.Count : intlist.Count; }
static public int Sort(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 1) { StrList self = (StrList)checkSelf(l); self.Sort(); pushValue(l, true); return(1); } else if (matchType(l, argc, 2, typeof(System.Comparison <System.String>))) { StrList self = (StrList)checkSelf(l); System.Comparison <System.String> a1; LuaDelegation.checkDelegate(l, 2, out a1); self.Sort(a1); pushValue(l, true); return(1); } else if (matchType(l, argc, 2, typeof(IComparer <System.String>))) { StrList self = (StrList)checkSelf(l); System.Collections.Generic.IComparer <System.String> a1; checkType(l, 2, out a1); self.Sort(a1); pushValue(l, true); return(1); } else if (argc == 4) { StrList self = (StrList)checkSelf(l); System.Int32 a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); System.Collections.Generic.IComparer <System.String> a3; checkType(l, 4, out a3); self.Sort(a1, a2, a3); pushValue(l, true); return(1); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public void Init() { string[] items = { "全部", "进行中", "可接取", "已完成", "未获取" }; m_DataChangeCallBackInfoPool.Init(32, () => { return(new DataChangeCallBackInfo()); }, v => { }); StrList strlist = new StrList(); strlist.Add(string.Empty); strlist.Sort((a, b) => a.CompareTo(b)); List <int> intlist = new List <int>(); intlist.Add(1); var sa = strlist[0]; intlist.Sort((a, b) => a.CompareTo(b)); int iaa = null != strlist ? strlist.Count : intlist.Count; int[] aa = new int[] { 1, 2, 3, 4, 5 }; int[,] bb = new int[, ] { { 1, 2 }, { 3, 4 }, { 5, 6 } }; var ia = bb[0, 1]; foreach (var s in strlist) { Console.WriteLine(s); } foreach (var v in aa) { Console.WriteLine(v); } foreach (var v in bb) { Console.WriteLine(v); } var act = (Action)(() => { Console.Write(ia); }); var cc = ToList(aa); List <Vector3> v3list = new List <Vector3>(); v3list.Add(Vector3.zero); Vector3List nv3list = new Vector3List(); nv3list.Add(Vector3.zero); var v3 = nv3list[0]; nv3list[0] = v3; var vv3 = ToArray(nv3list)[0]; ToArray(nv3list)[0] = vv3; }
public void Init() { string[] items = { "全部", "进行中", "可接取", "已完成", "未获取" }; m_DataChangeCallBackInfoPool.Init(null, null); StrList strlist = new StrList(); strlist.Add(string.Empty); strlist.Sort((a, b) => a.CompareTo(b)); List <int> intlist = new List <int>(); intlist.Add(1); var sa = strlist[0]; intlist.Sort((a, b) => a.CompareTo(b)); int iaa = null != strlist ? strlist.Count : intlist.Count; int[] aa = new int[] { 1, 2, 3, 4, 5 }; int[,] bb = new int[, ] { { 1, 2 }, { 3, 4 }, { 5, 6 } }; var ia = bb[0, 1]; foreach (var s in strlist) { Console.WriteLine(s); } foreach (var v in aa) { Console.WriteLine(v); } foreach (var v in bb) { Console.WriteLine(v); } var act = (Action)(() => { Console.Write(ia); }); var cc = ToList(aa); }