.net - With block equivalent in C#? -


I'm trying to brush on VB.Net and my C #. Is there a block equal to C #?

Thank you

Although there is no direct equivalent to the C # General case, C # 3 Advantage Object Constructor Syntax for Constructor Call:

var foo = new Foo {property1 = value1, property2 = value2, etc};

For more information see Chapter 8 of C # in depth - you can download it for free.

(Disclaimer - Yes, to get this book, I have interests in more people's hands. But hey, this is an independent chapter which gives you more information on related topics ...)


Comments