1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 using System.Runtime.InteropServices;
6 using Xunit;
7 
8 namespace SampleDynamicTests
9 {
10     public class OptionalParametersTest
11     {
12         public void Foo([Optional] decimal? d)
13         {
14             Assert.Equal((decimal?)null, d);
15         }
16 
17         [Fact]
OptionalParametersTest_RunTest()18         public static void OptionalParametersTest_RunTest()
19         {
20             dynamic d = new OptionalParametersTest();
21             d.Foo();
22         }
23     }
24 }
25