Can we have more than 1 partial classes in the same file?
Answers were Sorted based on User's Feedback
Answer / ssv_sathish
YES, basically, partial classes are meant for sharing or
working on different files. so you can have 2 partial
classes in the same file or different class declared as
partial in the same file, provided PUBLIC is the access
modifier.
Is This Answer Correct ? | 35 Yes | 4 No |
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 |
Answer / m.karunakar
yes.more than one programmer working in the same module in
the project.example one progrmmer writing one method in main
system and ononther programmer can also add onother method
are functionlity that class by using partial class.
Is This Answer Correct ? | 3 Yes | 0 No |
What is inline schema, how does it works
Explain Keep method in Tempdata in ASP.Net MVC?
How to set background for total website, on that another another layer, in that we keep website data,,for example see www.msn.com. On one faded background we ll have layer like other background..Do explain how its possible
What is the .net framework?
I have a GridView on web form, and a column in a grid is a linkbutton to open popup..., my problem is when i click on link button in a gridview popup opens as well works fine. but when i click on link button once again my popup window doesnt open. Can any one help please...
What is web api‘s in asp.net mvc 4 ?
What are the components required to create a route in mvc?
What is code first? : Entity framework
Requirement is: try { \\SQL Query } catch(Exception i) { print a } catch(SQLQueryException e) { \\SQL Query } Qu)I Got Exception in "try" block. Which "catch" statement (i.e. 1st catch or 2nd catch ) catches the exception and Why???
Explain dependency resolution?
Which is the default http method for an action method?
what is use of entity container?