What are partial classess in .net?

By j Miracle

How to use partial classes in asp.net

The use of partial classes in asp.net as is below.

When there is a need to keep the business logic separate from the User Interface or when there is some class which is big enough to have multiple number of developers implement the methods in it, the class can be separated and written in different files as partial class.

The keyword partial must appear in each class.

//syntax for C#
Public partial class MyPartialClass1
{
         //code
}

// this code could be in file1

Public partial class MyPartialClass1
{
         //code
}
// this code could be in file2

What are partial classess in .net?  (592 Views)