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 preprocessor in .net and type, where it use?

653


What are the types of authentication in asp.net?

547


When you are running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?

589


Is data edited in the Repeater control?

581


What are validator? Name the validation controls in asp.net? How do you disable them?

542






What are the components of ado.net?

527


How can you register a custom server control to a web page?

540


Mention few asp.net validators.

571


Explain the difference between server control and html control.

472


What is difference between Server.Transfer and Response.Redirect in ASP.NET?

552


Which is the best institute to learn Microsoft Technologies and the faculty if you Know?

1609


What is http response header?

555


What are the steps to follow to host a web application on a web server?

589


What is web configuration file and how to use in web application

591


What is difference between session and viewstate?

469