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 Difference between Callbacks and Postback in ASP.NET?

1 Answers   Patni,


How many rules are there regarding a well formed XML document? a) Nine b) Three c) Six d) Two

1 Answers   Syntax Softtech,


Why should i prefer JSP over asp.net or any other web development language..??

0 Answers  


what is SQL cache Invalidation?

1 Answers  


What is the difference between custom web user control and a custom web server control?

0 Answers  






What are the two types of web pages?

0 Answers  


What is the name of the process the browser uses to find the address of a web server? a) DMZ b) DNS c) Active Directory d) Database lookup

1 Answers   Syntax Softtech,


Why we use asp.net for website development?

0 Answers  


What?s the difference between Response.Write() and Response.Output.Write()?

2 Answers   Siebel, Visual Soft,


what is ienumerable interface?

1 Answers  


What is the difference between HTTP-Post and HTTP-Get ?

1 Answers  


what is the uses Of Global.asax

3 Answers  


Categories