Partial Classes In C#
If 2 or more wants to write the methods in same classes we can use partial class technique.
partial class Employee
{
public void getdetails();
}
partial class Employee
{
public void adddetails();
}
When an object of class is created, By default the compiler adds all partial class methods into single class.
Employee E = new Employee();
E.getdetails();
E.adddetails();
partial class Employee
{
public void getdetails();
}
partial class Employee
{
public void adddetails();
}
When an object of class is created, By default the compiler adds all partial class methods into single class.
Employee E = new Employee();
E.getdetails();
E.adddetails();
Partial Classes In C#
Reviewed by Share less to Learn More
on
6:46 PM
Rating:
No comments