EventDriven Programming
EventDriven Programming
Abrham Y.(Msc)
Department of Computer Science
1
Chapter 1
Introduction
Compiled By Abrham Y. 2
What is Programming?
Compiled By Abrham Y. 3
Window vs. Console programming
Compiled By Abrham Y. 6
What is .Net?
.Net is a framework tools which supports
many programming languages
What is framework :
– Is a collection of program that you can use to
develop your own application
– A set of pre-written code libraries designed to be
used by developers
.Net support more than 60 programming languages
like
Compiled By Abrham Y. 7
List of all programming languages
support by .NET
C#.NET Ada Clarion# LISP-like
VB.NET APL Cobol LOGO
C++.NET AsmL Cobra Lua
J#.NET Assembly CULE Mixal
F#.NET Basic E# Assembly
PL/I Basic Variants Eiffel Language
Processing BETA Flash Modrian
Prolog BF Forth Modula-2
Python C Fortran Nemerle
C# G# Oberon
C# Variants Haskell Pan
C++ IL/MSIL Pascal
Caml Java Pascal
CAT JavaScript Variants
CFML Lexico Perl
PHP 8
Compiled By Abrham Y.
Introduction to the Integrated
Development Environment
9
What is Microsoft Visual studio?
• It is an IDE(Integrated Development
Environment)
• It is just an editor tools used to write
.Net code (develop application usin
.net framework)
Compiled By Abrham Y. 10
What is C#.Net
• C#.Net is the most powerful programming
language among all programming language in .Net
, because C#.Net will contain all the feature of
C++, VB6.0 and Java and additional features
• In C#.net , the symbol # must should be
pronounced by “sharp” only because microsoft has
taken the symbol from musical note, whose name
11
is “sharp”
• We can say that C#.Net=c++ + VB6.0+Java
Compiled By Abrham Y.
Installation of Microsoft Visual studio
Compiled By Abrham Y. 12
Type of application that can be crated using
Microsoft Visual studio
1. Console application
2. Window form application
3. Web application
4. Mobile application
5. Web application
6. Windows service
7. Crystal report application
8. Setup and deployment application
9. WPF application
10. Web service application
11. Device application
12. AJAX enable web application
e.t.c Compiled By Abrham Y. 13
Creating console application
• Click Microsoft Visual studio->click on
file-> click on new-> click on project-
>select console application
Compiled By Abrham Y. 14
Structure of C#.Net program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication8
{
class Program
{
static void Main(string[] args)
{
}
}
}
Compiled By Abrham Y. 15
Your first line of code
The only thing we’ll do with the code is to write some text to the screen. But
here’s the code that Visual C# prepares for you when you first create a
Console Application:
Compiled By Abrham Y. 16
Running your Program
17
Compiled By Abrham Y.
Working with Console class
Compiled By Abrham Y. 18
Method/Function with console
• Write(“message”)
– This is used to display any message to the user
in the out put stream
– E.g Console.Write(“Wlecome”).
• WriteLine(Message”)
– This is used to display any message to the user
in the out put stream
– After displaying the message blinking cursore
moves to a new line
– E.g Console.WriteLine(“welcome”).
19
Compiled By Abrham Y.
• Read()
– This method is used to read a single character
from the input stream
• ReadLine()
– This method is used to read a group of
character from the input stream
Compiled By Abrham Y. 20
Example console application
Compiled By Abrham Y. 21