static void Methods() { IndexerResultCastTest inst = new IndexerResultCastTest(); string c = (string)inst.GetString(1); string d = (string)inst.GetString(2); Console.WriteLine(c, d); }
static void BadMethods() { IndexerResultCastTest inst = new IndexerResultCastTest(); object c = (string)inst.GetString(1); string d = (string)c; Console.WriteLine(d + c); }
static void Indexers() { IndexerResultCastTest inst = new IndexerResultCastTest(); string a = (string)inst [1]; string b = (string)inst [2]; Console.WriteLine(a, b); }