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?

Answer Posted / sridhar.venkataramanan

File 1.
partial class Employee
{
string employeename;
public void getEmployeeName(string empname)
{
employeename = empname;
}

public static void Main()
{

Employee objEmployee = new Employee();
objEmployee.getEmployeeName("Krish");
objEmployee.showEmployeeName();
Console.ReadLine();
}

}
File 2

partial class Employee
{
public void showEmployeeName()
{
Console.WriteLine("Name --->" + employeename);
}

}

Even though the method showEmployeeName is not a available
in file 1 since its partial class the complier would
combine the fragments of the file that corresponds to same
class.

Is This Answer Correct ?    28 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is NonActionAttribute ?

969


Why to use Html.Partial in ASP.Net MVC?

1056


What is the purpose of a web form?

950


Explain what is routing?

918


Why to use '{resource}.axd/{*pathInfo}' in routing in ASP.Net MVC?

2632


What are the major improvements provided by the common language runtime and the base class libraries? Or what are the major improvements in .net framework 4.0?

937


What is the difference between tempdata and viewbag?

883


What is representational state transfer (rest) mean?

936


Difference between ASP.NET MVC and ASP.NET WebForms?

1012


What filters are executed in the end?

975


How do you assign a value to a complex number 7 how has exception hand changed in .net framework 4.0?

883


What is mvc entity framework?

906


What is RouteConfig.cs in ASP.Net MVC 4?

1017


What symbol would you use to denote, the start of a code block in razor views?

922


List out few different return types of a controller action method?

994