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
mention what are the various methods provided by the dataset object to generate xml?
What are the versions of .net framework?
What is routeconfig.cs in mvc 4?
what is entity framework advantage?
Will the name change be reflected in any of the existing .net framework 2.0 apis, assemblies, or namespaces?
Explain the methods used to render the views in mvc?
What is the version number for the next version of the .net framework, codenamed �orcas�?
How large is the .net framework 3.0?
What is the use of view model in asp.net mvc?
What are action filters?
Is it possible to create a custom filter?
what is entityclient?
What is session state management?
What are Scaffold templates in ASP.Net MVC?
What is representational state transfer (rest) mean?