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
How route table has been created in asp.net mvc?
What is meant by bootstrap in mvc5?
Can you explain the page life cycle of mvc?
What is difference between Viewbag and Viewdata in ASP.NET MVC?
What is .net architecture?
Is it possible to cancel filter execution?
What is ViewData and TempData in ASP.Net MVC?
What is poco proxy? : Entity framework
Is razor a server side?
Which are the important namespaces used in ASP.Net MVC?
Do you know about the new features in ASP.Net MVC 4 ?
What is edm (entity data model)? : Entity framework
Explain Sections is ASP.Net MVC?
What is a model in android?
What is the difference between model view and controller?