static void Main(string[] args) { dynamic bagA = new FastNBag(5); bagA.Foo = 1; bagA.FooFoo = 2; bagA.FooBar = 3; bagA.Bar = 4; bagA.BarFoo = 5; bagA.BarBar = 6; // Retrieves from fast array: Console.WriteLine(bagA.FooBar); // Retrieves from hashtable: Console.WriteLine(bagA.BarBar); // Binding fails - C#'s own runtime binder exception is thrown: try { Console.WriteLine(bagA.Baz); } catch (Exception e) { Console.WriteLine(e.ToString()); } }
public MetaFastNBag(Expression expression, FastNBag value) : base(expression, BindingRestrictions.Empty, value) { }