Thursday, March 26, 2015

What is a Partial class?

Instead of defining an entire class, you can split the definition into multiple classes by using partial class keyword. When the application compiled, c# compiler will group all the partial classes together and treat them as a single class. There are a couple of good reasons to use partial classes. Programmers can work on different parts of classes without needing to share same physical file


Ex:

Public partial class employee
{
Public void somefunction()
{
}
}



Public partial class employee
{
Public void function ()
{
}
}

No comments:

Post a Comment