While I dug into Orcas March CTP Documentation I found another new C# feature (at least for me). It is called Partial Method Definitions and allows you to separate method definition and method implementation in partial classes.
//Definition
partial void partial void onNameChanged();
//Implementation
partial void onNameChanged()
{
//method body
}
As I have C++ background this sounds familiar to me and reminded me times when I had to declare methods in .h (header) files and put implementation in .c/.cpp files.
To be honest I am not able to find the advantages of this new feature but I suppose there will be more blog post soon that will discuss this.
As I emphasize above you can separate method definition from implementation only in partial classes. There are number of restrictions stated in Orcas documentation:
Thursday, March 08, 2007 7:39:31 PM (FLE Standard Time, UTC+02:00) Comments [3] - .NET Development | LINQ
Remember Me