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 |
Features in ASP.NET ?
One Listbox showing all cities. If you select one city in list box the information related to that particular city should be displayed in Datagrid . How do you do that?
What are the advantages of passport authentication?
Explain the difference between webfarm and webgardens in .net?
If(dropdownlist1.selectedIndexChanged==true) { //code } else { //code } I am getting error in If condition, so can u pls give me a solution.
whats the purpose of AUTOPOSTBACK property for the controls in asp.net?
What’s difference between “optimistic” and “pessimistic” locking?
when we write the html code with runat = server it works like a server control than why we use the server control?
Difference between mvc2 and mvc3 in asp.net?
What is the difference between stored procedure vs function?
Explain the differences between Server-side and Client-side code?
what are the State management and Its Uses