what are partial classes and their use?



what are partial classes and their use?..

Answer / alb.shah

This is a feature of 2005,when we have large and unwildly
classes instead of writing all the methods in same program
we will divide the class into number of programs with the
same class name,these classes are preceeded with partial
keyword,when we compile all this partial classes only one
dll with the same class name will be created.


class with some 20 methods:
Example.cs
class classA{
m1( );
m2( );
.
.
.
m20( );
}

Apply partial concept:

Example1.cs
partial class classA
{
m1( );
m2( );
.
.
m8( );
}
example2.cs
partial class classA
{
m9( );
m10( );
.
.
m15( );
}
Example3.cs
partial class classA
{
m16( );
.
.
m20( );
}

if we compile Examle1.cs,Example2.cs,Example3.cs it will
create only one dll

Is This Answer Correct ?    9 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is the best way to search any exact information on google?

3 Answers   Intellevate,


Explain the asp.net mvc folder conventions? : asp.net mvc

0 Answers  


In What Order Do The Events Of An Aspx Page Execute. As A Developer Is It Important To Undertsand These Events?

0 Answers   Siebel Systems,


What is event in asp.net?

0 Answers  


Explain what does mvc represent in asp.net? : asp.net mvc

0 Answers  






What are the type of session in Asp.Net

3 Answers  


What are the differences between primary foreign and unique keys?

0 Answers  


Is It Possible For Whole Page is Saved In View State? What Is View State?

2 Answers   Phoenix Technologies,


How would you enable impersonation in the web.config file?

0 Answers  


Elaborate differentiation between Cache and Application?

0 Answers   QuestPond,


What are the main advantages of using asp.net?

0 Answers  


What are tuples?

0 Answers  


Categories