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 the significance of nonactionattribute?
How route table is created in ASP.NET MVC?
What are the Core features of ASP.NET MVC?
What is the meaning of unobtrusive javascript?
What “beforFilter()”,“beforeRender” and “afterFilter” functions do in Controller?
Can I set the unlimited length for "maxjsonlength" property in config?
What does mvvm mean?
What is associationset? : Entity framework
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?
What is renderbody?
What is managed extensibility framework?
Explain Keep method in Tempdata in ASP.Net MVC?
What is object service? : Entity framework
What is needed for running an application built on winfx on the .net framework 3.0?
What is namespace of asp.net mvc?