Difference between revisions of "WITH in C Sharp"

From Logic Wiki
Jump to: navigation, search
m (Macrop moved page With in C to WITH in C Sharp without leaving a redirect: misspelled)
 
m (1 revision imported)
 
(No difference)

Latest revision as of 14:27, 9 May 2016


Although C# doesn't have any direct equivalent for the general case, C# 3 gain object initializer syntax for constructor calls:

var foo = new Foo { Property1 = value1, Property2 = value2, etc };