Definition :Partial types are allow to define a single class in multiple files (more than one file), when compilation time theses classes are combined to form a single class.
The partial modifier is not available on delegate or enumeration declarations.
Example
//partial class
public partial class Student
{
public virtual void GetRollNo();
}
public partial class Student
{
public virtual void GetStudentName();
}
//Derived class
public class School : Student
{
public void getStudentDetails()
{
GetRollNo();
getStudentDetails();
}
}
6 comments:
very nice example and too easy to understand.
Very nice example and too easy to understand.
Really superb
Really superb
Very Good example
good one!!
very neatly explained,
it may also help u:
Partial class in C#.Net
Post a Comment