5
Answers

Partial Classes

Hi everyone

Can someone please explain to me the basic structure of a partial class and how they work

Thank you!

Answers (5)

0
Photo of Vulpes
NA 98.3k 1.5m 11y
You can have as many partial classes as you like.

There are no other options for splitting classes in a similar fashion.

However, you can nest one class inside another and move some of the 'outer' class's functionality into the 'inner' class.


Accepted
0
Photo of Nhlanhla A W Mkhize
NA 73 4.6k 11y
ok thanks for your help Vulpes and Abhijit
0
Photo of Nhlanhla A W Mkhize
NA 73 4.6k 11y
thanks for your reply....in a program/app how many partial classes can you have and what other options can you use beside partial classes if you want split your classes?
0
Photo of Lakshmanan Sethu
NA 19.3k 2.4m 11y
Please verify the link http://www.c-sharpcorner.com/UploadFile/3d39b4/partial-classes-in-C-Sharp-with-real-example/
0
Photo of Abhijit  Patil
NA 4.4k 660.7k 11y
Hey i explain below in Patical class in details for windows application in C#

By default the project comes with 2 files in it:
-Form1.cs
-Program.cs

-Form1.cs is the file in which a class Form1 is defined inheriting from predefined class Form.
Eg: public partial class Form1 : Form



-Windows applications developed under VS has 2 places to work with:
1. Design View
2. Code View

-Design View is the place where we design the app. this is accessible both to programmer's and end user's where as Code View is the place where we write code for the execution of application, this is accessible only to programmers.