Question:
What is partial class. & what is advantage.
Answer:
Partial Class is spilt UI Logic and Business logic in separate files. Multiples developers can work on the same class file. At the compilation time it will treat as single file by it class name. Source: CoolInterview.com
Answered by: Bhargavi | Date: 5/26/2008
| Contact Bhargavi
We can use more than one file for one partial class so we can bifurcated business logic if we are using more than one , thsi will be more readable and user can understand easily and easily debug also. Source: CoolInterview.com
Answered by: Devendra | Date: 7/15/2008
| Contact Devendra
It is possible to split the definition of a class or a struct, or an interface over two or more source files. Each source file contains a section of the class definition, and all parts are combined when the application is compiled. There are several situations when splitting a class definition is desirable:
*
When working on large projects, spreading a class over separate files allows multiple programmers to work on it simultaneously. *
When working with automatically generated source, code can be added to the class without having to recreate the source file. Visual Studio uses this approach when creating Windows Forms, Web Service wrapper code, and so on. You can create code that uses these classes without having to edit the file created by Visual Studio. *
To split a class definition, use the partial keyword modifier Source: CoolInterview.com
Answered by: Siri | Date: 7/24/2008
| Contact Siri
When a class or method used to be wriiten in multiple lacation with same name then that class or method need to be declared as partial class or partial method. Source: CoolInterview.com
Answered by: sudha | Date: 3/22/2010
| Contact sudha
one class is divided in to more than one class that is called as the partial class.means the logic of the one class is divided into more than one class.but it works as a one class
Regards, Nicku Source: CoolInterview.com
Answered by: nicku | Date: 8/11/2010
| Contact nicku
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|