Visual Studio uses partial classes to separate auto-generated code from user-generated code.
Example:Let us consider that visual studio creates a file called Form1.Designer.cs which holds the designer-related, auto-generated code. So in both Form1.cs and Form1.Designer.cs the Form1 class is declared as partial and the compiler joins them into one.
Visual Studio uses partial classes to separate auto-generated code from user-generated code.
Example:Let us consider that visual studio creates a file called Form1.Designer.cs which holds the designer-related, auto-generated code. So in both Form1.cs and Form1.Designer.cs the Form1 class is declared as partial and the compiler joins them into one.
when different programmers work on single project and all write a code in class .Every programmer declare this class as Partial class and implement own code at the end of the day this partial class have all functionality that all programmers put in this class.
What is the situation you will need to use partial class in .net
Editorial / Best Answer
Sandhya.KishanVisual Studio uses partial classes to separate auto-generated code from user-generated code. Example:Let us consider that visual studio creates a file called Form1.Designer.cs which holds the designer-related, auto-generated code. So in both Form1.cs and Form1.Designer.cs the Form1 class is declared as partial and the compiler joins them into one.
Related Answered Questions
Related Open Questions