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

Which filter executes first in an asp.net mvc application?

1040


How do I install .net framework?

1018


how can you tell ef to have a different table or column name than that defined for the class?

1105


What is objectset? : Entity framework

1071


What are Model Binders in ASP.Net MVC?

1372


What is Dependency Injection in ASP.Net MVC

1102


Is dapper faster than entity framework?

1032


what is scalar property?

1122


What is meant by viewdata?

1049


How to change the action name in mvc?

1048


Explain the difference between viewbag and viewdata in mvc?

1018


What is the role of the jit compiler in .net framework?

1164


Explain representational state transfer (rest) in detail?

1096


what is entity sql?

1151


What are the components of the .net framework.

1100