Interview answers verified by specialists.

Find interview questions and answers on this website:


See right interview answers on 30 common job interview questions

What is partial classess in .net?

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

Partial classes allow us to divide the class definition into multiple files (physically). Logically, all the partial classes are treated as a single file by the compiler. 

Do you know that?

20M+ messages are sent through the Elance workroom each year Next

Articles:

Popular:

Fast Payments
Payoneer sing up to get free 
$25