static void TestCollection() { List <int> list = new List <int>(); list.Insert(0, 1); list.Insert(1, 2); Console.WriteLine(list[2]); list.Insert(2, 3); IKeyValueCollection collection = null; int intValue; collection.TryGet("Hello", out intValue); }
public bool TryGet <T>(string key, out T value) { Ensure.NotNullOrEmpty(key, "key"); if (keyType != null && key == "Type") { value = (T)(object)keyType; return(true); } if (prefix != null) { key = prefix + key; } return(inner.TryGet(key, out value)); }