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 the significance of nonactionattribute?

984


How route table is created in ASP.NET MVC?

1031


What are the Core features of ASP.NET MVC?

1033


What is the meaning of unobtrusive javascript?

1017


What “beforFilter()”,“beforeRender” and “afterFilter” functions do in Controller?

988


Can I set the unlimited length for "maxjsonlength" property in config?

975


What does mvvm mean?

921


What is associationset? : Entity framework

1020


i just want to write an exam regarding .net?plz give me information about taking a test?where to pay 4 d exam,exam centre?

2196


What is renderbody?

987


What is managed extensibility framework?

956


Explain Keep method in Tempdata in ASP.Net MVC?

1016


What is object service? : Entity framework

1136


What is needed for running an application built on winfx on the .net framework 3.0?

909


What is namespace of asp.net mvc?

1090