Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApplication15
- {
- public class Args
- {}
- public class Class
- {
- public void Execute(Args args)
- {
- Console.WriteLine(args);
- }
- }
- class Program
- {
- static void Main()
- {
- dynamic c = new Class();
- // doesn't work:
- // object args = new Args();
- // works:
- //dynamic args = new Args();
- // works
- var args = new Args();
- c.Execute(args);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement