I have been reading Programming Microsoft® Visual C#® 2008: The Language to get a better understanding of C# and what can be done with it. I came across partial classes whic
Partial class are now used heavily in ASP.Net to allow two source files the mark-up based example.aspx and the code based example.aspx.cs so that methods and variable defined in each are visible to each. in the example.aspx
in the example.aspx.cs
private object GetProperty(){ // called from aspx
return DateTime.Now;
}
private void DoStuff(){
ExampleControl c = exampleCntr; //exampleCntr is defined in aspx.
}
The bi-directional nature of this cannot be recreated with abstract classes.