top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

What is a Partial class?

+1 vote
281 views

Explain about Partial Class

posted Nov 20, 2014 by Vinitha

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

0 votes

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
Example:

Public partial class employee
{
Public void somefunction()
{
}
}
Public partial class employee
{
Public void function ()
{
}
}
answer Nov 20, 2014 by Manikandan J
Similar Questions
+5 votes

If there are two interfaces having one method with same signature. and your class is implementing both. and you have implemented that method only once. So in this case will it work or any warning or error will come? if works then how compiler will come to know method of which interface you are implementing?

...