Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what are partial classes and their use?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between union and structure?

955


What is the difference between equals() and == in c#?

1011


What is the procedure to handle the process request using mhpm events fired? : asp.net mvc

1061


What is the difference between ASP Session State and ASP.Net Session State?

1083


What is cookies in asp net?

945


How can you dynamically add user controls to a page?

960


What is session management in web application?

1021


Describe the application event handlers in ASP.NET?

1044


How many types of cookies are available in asp?

1058


What is difference between session and cookie?

1001


What is the use of autowireup in asp.net?

1053


What are the advantages of Web API?

1108


Why SessionID changes in every request in asp.net?

969


8. Why do you want to work here?

1919


What are the disadvantages of using session?

1098