From 391597337ead796ece600d320fea6c6e1ddb33af Mon Sep 17 00:00:00 2001 From: Stuart Mosquera Date: Fri, 6 Feb 2026 21:30:34 -0300 Subject: [PATCH] Improve 'Arguments of type dynamic' section snippet --- .../interop/snippets/using-dynamic/Program.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs index c598047d337c8..31939f0b4e196 100644 --- a/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs +++ b/docs/csharp/advanced-topics/interop/snippets/using-dynamic/Program.cs @@ -9,7 +9,7 @@ static void Main(string[] args) // The following call to exampleMethod1 causes a compiler error // if exampleMethod1 has only one parameter. Uncomment the line // to see the error. - //ec.exampleMethod1(10, 4); + // ec.exampleMethod1(10, 4); dynamic dynamic_ec = new ExampleClass(); // The following line is not identified as an error by the @@ -74,8 +74,10 @@ static void Examples() // The following statement does not cause a compiler error, even though ec is not // dynamic. A run-time exception is raised because the run-time type of d1 is int. ec.exampleMethod2(d1); + // The following statement does cause a compiler error. - //ec.exampleMethod2(7); + // Uncomment the line to see the error. + // ec.exampleMethod2(7); // } }