Uploaded by Mahmoud Abdel-Salam

3 PDFsam Prog 4-2019

advertisement
Part 4
OOP - introduction
OOP
 Example:
namespace Coding
{
class Example1
{
//statements [variables, methods, constructors, ..]
}
class Program
{
static void Main()
{
}
}
class Example2
{
//statements [variables, methods, constructors, ..]
}
}
 How can we represent real life objects in C#:
☺ ‫ الفصيلة‬- ‫ الفئة‬ Class
☺Attributes  variable
☺Actions  Methods
☺A class contains variables and methods.
2|Page
Download