WINDOWS PROGRAMMING
Abrham Y.(Msc)
Department of Computer Science
1
Chapter 1
Introduction
Compiled By Abrham Y. 2
What is Programming?
• It is a language human being used to
communicate with computer but not all
human being(only programmers).
• It is a language programmers used to
develop application or software
• Is a specified methods of communication
between the programmer and computer
Compiled By Abrham Y. 3
Window vs. Console programming
What is the different between windows and
console application
• Console application don’t have user
interface. E.g console programming
c++,c
• window form application do have user
interface . E.g Window programming
vb6.net ,c#.net
Compiled By Abrham Y. 4
Platform dependency vs Independency
• What is platform:-is the combination of
CPU architecture and operating system
architecture.
• What is platform dependency:-code that
has been generated by the language
compiler compilation doesn’t run/execute
on a different processor and in different
operating system that which it has been
compiled , this nature is known as platform
dependency. Compiled By Abrham Y. 5
• What is platform independency:-if the code
generated by language compiler
compilation run on any processor and in any
operating system that which it has been
compiled the it is known as platform
independent.
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
• Console is a class used to work with input
and output
• Console class is present in system
Namespace
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
• Write a program that read your name and
display to screen
• Write a program that accept two number
from a keyboard and display to screen
Compiled By Abrham Y. 21