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

Describe session handling in a webfarm, how does it work and what are the limits?

0 Answers   Siebel Systems,


Which is better php or asp.net?

0 Answers  


Explain the features that make asp.net more used framework? : asp.net mvc

0 Answers  


Explain swagger components.

0 Answers  


Apart from IDE what are the enhancements in asp.net 2.0?

0 Answers   Microsoft,






Describe the sequence of action takes place on the server when ASP.NET application starts first time?

0 Answers   CDC,


Which template must you provide, in order to display data in a Repeater control?

3 Answers   Siebel Systems, Wipro,


What are the new page events added in Asp.net 2.0 ?

5 Answers   Sapient, TCS,


What are the different types of proxy patterns?

0 Answers  


What is the difference between an EXE and a DLL?

18 Answers   Infosys, JK Associates, Persistent, TATA, Technosoft, Wipro,


Elaborate differentiation between Cache and Application?

0 Answers   QuestPond,


What websites use asp.net?

0 Answers  


Categories