public void TestImp(UnityEngine.Vector2 pos) { object o = pos; var list = o as IList <int>; var arr = o as int[, ][]; var dict = new StrStrDict(); string v; if (null != dict && dict.TryGetValue("abc", out v)) { Console.WriteLine(v); } else if (null != dict && dict.TryGetValue("abc2", out v)) { Console.WriteLine(v); } while (null != dict && dict.TryGetValue("abc2", out v)) { Console.WriteLine(v); } do { Console.WriteLine(v); } while (null != dict && dict.TryGetValue("abc2", out v)); UnityEngine.Vector3 vv = UnityEngine.Vector3.zero; vv.x = v == "yes" ? 123 : v == "no" ? 456 : 789; int iv = v == "yes" ? 123 : v == "no" ? 456 : 789; list.Add(v == "yes" ? 123 : v == "no" ? 456 : 789); int statusA = 3; statusA = statusA == 1 ? 2 : statusA == 2 ? 1 : statusA == 3 ? 0 : ++statusA; }
static public int TryGetValue(IntPtr l) { try { StrStrDict self = (StrStrDict)checkSelf(l); System.String a1; checkType(l, 2, out a1); System.String a2; var ret = self.TryGetValue(a1, out a2); pushValue(l, true); pushValue(l, ret); pushValue(l, a2); return(3); } catch (Exception e) { return(error(l, e)); } }