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 are the built-in objects in asp.net?

754


Differentiate between file-based dependency and key-based dependency.

736


hi .net gurus. plz if any one has dumps on 70-631 and 70-541 on windows sharepoint services kindly mail me.

1460


Define globalization and localization.

757


What is the life cycle of web page?

737


How to do state management in ASP.NET?

808


What is meant by server side scripting?

715


Explain what does mvc represent in asp.net? : asp.net mvc

707


Explain About WebService

900


What are the parts of an http response?

710


Can you explain one critical mapping? Performance issue which one is better? Whether connected lookup tranformation or unconnected one?

1030


What is the difference between asp.net mvc and asp.net webforms? : asp.net mvc

770


What is State Management in .Net and how many ways are there to maintain a state in .Net? What is view state?

812


In a Repeater control how one can provide an alternating color scheme ?

792


9. Why should we hire you over the others waiting to be interviewed?

2478