diff --git a/ValidCode/Dynamic.cs b/ValidCode/Dynamic.cs new file mode 100644 index 00000000..459f0a29 --- /dev/null +++ b/ValidCode/Dynamic.cs @@ -0,0 +1,17 @@ +namespace ValidCode +{ + using System.Collections.Generic; + using System.Dynamic; + using NUnit.Framework; + + public class Dynamic + { + [Test] + public void Index() + { + dynamic expando = new ExpandoObject(); + expando.name = "John"; + Assert.AreEqual("John", ((IDictionary)expando)["name"]); + } + } +} diff --git a/ValidCode/ValidCode.csproj b/ValidCode/ValidCode.csproj index c11c0947..2afac4e2 100644 --- a/ValidCode/ValidCode.csproj +++ b/ValidCode/ValidCode.csproj @@ -13,6 +13,7 @@ + \ No newline at end of file