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
Define the core components of an ASP.NET MVC application?
How route table has been created in asp.net mvc?
What are the difference between asynchronous controller implementation between asp.net mvc 3 & asp.net mvc 4?
What is page life cycle?
What are Validation Annotations?
What are ajax helpers in asp.net mvc?
what is msl?
What is stateless model?
What is the use of viewmodel in mvc?
How does the .net framework 3.0 relate to windows vista?
What is viewstart page in mvc?
I have 2+ years of fake experience,actually i could not answer for project questions..?how can i answer please suggest me..?
how do you query in entity model when the result has a join from from different database other than the entity model?
What are the main features of asp.net mvc 4 used by asp.net web api?
explain what does .edmx file contains?