What is partial class in Dot Net 2.0?

rajesh.forum

Well-known member
Joined
Sep 7, 2007
Messages
55
Programming Experience
Beginner
Hi
Can anyone tell me about partial class in dotnet 2.0?I never seen partial class in Dto Net 1.0.Please reply wat is the use of it?



rajesh.
 
Most importantly it is used by Visual Studio to put the generated code in its own file, and keep your user code separated from this. (show all files in Solution Explorer and expand the form tree to see the .Designer.vb files) This makes it easier for the Studio to generate and maintain this file, and better protection to keep developers hands off it :) You can also use partial classes to organize parts of your classes into separate files, but all parts of a class have to be included at compile time of assembly, you can't dynamically load more parts of a class at runtime. VS does not currently display your own partial classes in a nice tree structure in Solution Explorer, but I guess that is a feature to come.
 
Back
Top