C# 3.0 partial methods and automatic properties

Fabian Schmied <[email protected]> Fri, 10 Nov 2006 19:48:04 +0100
Newsgroups gmane.comp.windows.devel.dotnet.cx
Message-ID <[email protected]>
Having visited a few talks by Anders Heljsberg this week on the TechEd
Developers 2006 EMEA, I learned about two new C# 3.0 features I wasn't
really aware of previously. The first one is that of partial methods.
Unfortunately, I missed the whiteboard discussion where AH seems to
have defined what these actually are - can anybody on this list shed
some light on this new feature? Is it finally possible to implement
the same method in different parts of a partial class, having these
implementations being merged into one? Or is it something different?

The other thing is automatic property generation - shortcut property
declarations, for which the compiler automatically generates a private
field as well as getter/setter methods. Anders Hejlsberg said that
this feature is actually the one they were asked for the most - why's
that? After all, an auto-generated property behaves pretty much the
same as a public field, with the only advantage being that you can
choose to make it more complex at a later time without having to
recompile client code. Is that really so important? Am I missing
something?

Regards,
Fabian

===================================
This list is hosted by DevelopMentor®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com