what are partial classes and their use?

Answer Posted / arunajyothi.m

“partial” keyword can be used to split a single class,
interface, or struct into multiple, separate files in
ASP.NET (using C# as the language). This permits multiple
developers to works on these files, which can later be
treated as a single unit by the compiler at the time of
compilation and compiled into MSIL code.

1.Partial classes can improve code readability and
maintainability by providing a powerful way to extend the
behavior of a class and attach functionality to it.

2.The partial modifier can only appear immediately before
the keywords class, struct, or interface.

3.Nested partial types are allowed in partial-type
definitions.

4.Using partial classes helps to split your class
definition into multiple physical files.

5.Note that the partial keyword applies to classes,
structs, and interfaces, but not enums

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is session in web technology?

745


How to manage different kinds of sessions in ASP.NET?

801


What is an asp.net web form?

842


How can we identify that the Page is Post Back?

761


Explain the flow of processing of the request? : asp.net mvc

747


what is loosely coupled solution? How it can be used?

800


Asp pages that worked pefectly on windows 2000 server and iis 5.0 do not work on windows 2003 server with iis 6.0. Asp.net pages work fine. Why?

787


How can we use Web API with ASP.NET Web Form?

847


What is difference cookie and session?

772


Why asp.net mvc is better than asp.net? : Asp.Net MVC

718


Can you explain why it is useful to use mvc instead of webforms? : asp.net mvc

817


Which browsers support the xmlhttprequest object?

735


What is application in asp net?

698


Is it possible for me to change my aspx file extension to some other name?

803


What is asp.net mvc? : asp.net mvc

792