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...

Can we have more than 1 partial classes in the same file?

Answer Posted / mahesh kotekar

It is possible to have partial class in same class file.

Partial Class Concept was used in dotnet to provide
practically dividing the class into two or multiple physical
files. In order to keep the complexity of class
simple.During compilation the partial classes join together
to form a single class and works as normal class
partial class First
{
public static void DoSomething1()
{
Console.WriteLine("Executing from First Part of
Class First");
}
}
partial class First
{
public static void DoSomething2()
{
Console.WriteLine("executing from second part of
class First");
}
}

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is .net framework going away?

967


How to make sure Client Validation is enabled in ASP.Net MVC

1016


Can I add asp.net mvc testcases in visual studio express?

1032


what is code first approach?

1058


What are html helpers in asp.net mvc?

975


Explain bundle.config in mvc4?

1090


What are the new features 3.5 framework against with the tool?

973


What is namespace of asp.net mvc?

1066


What does a viewmodel do?

955


What are the levels at which filters can be applied in an asp.net mvc application?

1035


What is the use of razor view engine?

910


Explain .Net Framework? Why we use it?

1037


How we can invoke child actions in ASP.Net MVC?

1052


What is routeconfig.cs in mvc 4?

1065


Explain tempdata in mvc?

935