I do like the feature, but don't see at the moment that it actually saves
much typing other then a newline or so and in some ways can be a bit harder
to look at. Being able to stick more on one line does not equal clearer
code imo:
c = new C()
c.Name1 = "name";
-vs-
c= new C(){Name1="name"}
What are all the advantages?
--
William Stacey [C# MVP]
"Chris Mullins [MVP]" <cm******@yahoo.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
| "Paul" <pa*********@corpoflondon.gov.ukwrote:
| Is it possible to make use of named parameters outside of Attribute?
| >
| If so how :)
|
| C# 3.0, which ships this year, brings what you're looking for - they're
| called Object Initializers. You can read all about them at:
|
http://blogs.msdn.com/wriju/archive/...tializers.aspx
|
| This is something that I've missed for a while too, as I quite like doing
it
| with Attributes.
|
| --
| Chris Mullins, MCSD.NET, MCPD:Enterprise, Microsoft C# MVP
|
http://www.coversant.com/blogs/cmullins
|
|
|