Skip to content

Commit

Permalink
Dynamic valid code.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanLarsson committed Dec 3, 2019
1 parent 90a6ea4 commit 49502b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions ValidCode/Dynamic.cs
Original file line number Diff line number Diff line change
@@ -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<string, object>)expando)["name"]);
}
}
}
1 change: 1 addition & 0 deletions ValidCode/ValidCode.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
</ItemGroup>

<ItemGroup>
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Windows.Forms" />
</ItemGroup>
</Project>

0 comments on commit 49502b9

Please sign in to comment.