what are partial classes and their use?
Answer Posted / dasharatham
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 ? | 3 Yes | 2 No |
Post New Answer View All Answers
How do u deploy your asp.net application?
Define repository pattern in mvc.net? : asp.net mvc
What is special types forms
What kind of data can be stored in viewstate?
What are Authentication and Authorization?
What is asp.net with mvc? : Asp.Net MVC
Explain server-side scripting?
What is the use of express session?
How can we inherit a static variable?
How do you secure your connection string information?
Describe the method to create a permanent cookie?
Can we have 2 web config files?
What is a form tag?
What does the .webpart file do?
Explain the basic functionality of garbage collector?