0% found this document useful (0 votes)
35 views

Edp Chap 3part 1

Uploaded by

Dinksraw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

Edp Chap 3part 1

Uploaded by

Dinksraw
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 39

Event Driven Programming

Chapter 3: Object-Oriented
Fundamentals in C#.NET
Part_1

DUCoE, By: Ins. Solomon S.


Outlines
Language Fundamentals
o Variables and Data Types
o Control Flow
o Methods and Their Types
o Events
Classes and Objects
Inheritance and Overloading Implementation
Classes versus Components
What is C#?
 It is an object-oriented programming language created by Microsoft that runs
on the .NET Framework.
 C# has roots from the C family, and the language is close to other popular
languages like C++ and Java.
 C# is used for: Mobile applications, Desktop applications, Web
applications, Web services, Web sites, Games, VR, Database applications,
and much, much more!
C# Syntax
C# Output/Input

To output values or print text in C#, you can use the WriteLine() method.

In C#, the simplest method to get input from the user is by using the ReadLine() method of
the Console class. However, Read() and ReadKey() are also available.
C# Comments

Comments can be used to explain C# code, and to make it more readable. It can also be used
to prevent execution when testing alternative code.
C# Single-line Comments
o Single-line comments start with two forward slashes (//).
o Any text between // and the end of the line is ignored by C# (will not be executed).

C# Multi-line Comments


o Multi-line comments start with /* and ends with */.
o Any text between /* and */ will be ignored by C#.
C# Variables
…C# Variables

A demonstration of how to declare variables.


C# Data Types
Control Flow
C# The if Statement
C# The else Statement
C# The else if Statement
C# Switch
…C# Switch
…C# Switch
…C# Switch
C# While Loop
…C# While Loop
…C# While Loop
…C# While Loop
C# For Loop
…C# Nested for Loop
…C# Nested for Loop
…C# foreach Loop
C# Break and Continue
…C# Break and Continue
C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
…C# Arrays
End of Part_1

You might also like