Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public delegate int CalculateDelegate();
- public class TestClass
- {
- CalculateDelegate Calc{ get; }
- }
- public void Test()
- {
- TestClass c = new TestClass
- {
- CalculateDelegate = delegate { return 42; }
- }
- Assert.Equal(c.CalculateDelegate() == 42);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement