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
What is Area in ASP.Net MVC?
what is entity framework advantage?
What you mean by routing in asp.net mvc?
what is dot net? what is use dot net? what is benifit of dot net?what is vb dot net? what is ado dot net? what is c#?
Explain the advantage of packaging over xcopy in .net?
Which .net framework is installed?
what is minimum requirement for entity framework applications to run?
how to disable the lazy loading framework?
what is entity sql?
What is difference between Viewbag and Viewdata in ASP.NET MVC?
Explain .Net Framework? Why we use it?
Explain Model, view and Controllers in Asp.Net MVC?
What is viewstart page in mvc?
what is msl?
What are the Core features of ASP.NET MVC?