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
What does mvvm mean?
What is edm in entity framework?
How to update one of my table in database at 4pm every day how it is possible?
Explain tempdata in asp.net mvc?
Is .net framework backwards compatible?
Is dapper faster than entity framework?
What is the purpose of a web form?
differences between poco, model first and data first approach?
What are the versions of .net framework?
Is .net core replacing .net framework?
Explain the types of Scaffoldings.
how to disable the lazy loading framework?
What is the difference between model and entity?
What is mvc entity framework?
What is managed extensibility framework?