0% found this document useful (0 votes)
2K views32 pages

C#ProgrammingMyanmar PathOne

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

C#ProgrammingMyanmar PathOne

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

1 C# Programming Myanmar

C# Programming

C#
Microsoft Visual studio 2013 install ႔

Misrosoft Sql install


CUP ႔ memory

install ႔

Visual studio
၁ Console application
၂ Windows application
၃ Web application

Windows application

Programming language ႔

-Web Developer
-Windows Software Developer
-Game Developer
-Mobile App Developer

Windows Software Developer

programming fundamental language

programming
programming fundamental
႔ ႔
2 C# Programming Myanmar

C# programming

C# programming
Microsoft company ႔ language Visual studio
application error

application c#
programming

[Link] ႔ run ႔
႔ Windows form ႔

Application ႔---

Application ႔
-programming
- ( )
-Database ( Select )
-Database ႔
Windows application

---
Software developer


႔ ႕

႔ ႔
႔ ႔ ႔

3 C# Programming Myanmar

႕ c# programming ႔

C# Programming

႕ ႔



European Computer Manufacturers Association ႔

- ႔

႔ ႔

- Boolean Conditions
- Automatic Garbage Collection
- Standard Library
- Assembly Versioning
- Propertties and Events
- Delegates and Events Management
- Easy to use Generics
- Indexers
- Conditions Compliation
- Simple Multithreading
- LINQ and Lambda Expressions
- ႔ Lan
4 C# Programming Myanmar


႔ ႔ ႔
႔ ႔


႔ ႔


- Common Language Runtime (CLR)


- The .Net Framework Class Library
- Common Language Specification
- Common Type System
- Metadata and Assemblies
- Windows Forms
- [Link] and [Link] AJAX
- [Link]
- Windows Workflow Foundation (WF)
- Windows Presentation Foundation
- Windows Communication Foundation (WCF)
-




5 C# Programming Myanmar

Xamarin Frame ႔
႔ ႔ ႔ Xamarin
႕ ႔

- Native UI, Native API, Native Performance


- Objecti - ႔
႔ ႔


Junior ႔


6 C# Programming Myanmar

Microsoft visual studio 2013


project ႔ new project

language
Visual C# ႔ ႔
7 C# Programming Myanmar

Visual studio

visual c# ႔
႔ menu Windows Windows
Forms Application

Name frmTest ႔
Location project ႔ folder

Project
8 C# Programming Myanmar

C# (၂

႔ ႔

-
(၁) Projects

Projects ႔ Windows form


႔ properties ႔
Solution explorer ႔
Toolbox Form
9 C# Programming Myanmar

Toolbox ႕

Button
10 C# Programming Myanmar

႕ button1 button
button1 Save
Properties Text button1 ႔
Save ႔

Properties And Event

Property Event

Property
Event ႔


frmTest Windows Form
Save ႔ button1

frmTest Programming ႔ class


button1 class
programming Class Method ႔ Event ႔
11 C# Programming Myanmar

Windows Form Property ႔ Event


Save Button1 Property ႔ Event
properties

ABC ႔

Design Name button1 btnSave ႔

button ႕ Properties
12 C# Programming Myanmar

Event

mouse Event ႔
button ႕ Event
event save button button
႕ properties

---
13 C# Programming Myanmar

Save message box


Save double click

button ႔
run ---

Run ႔
14 C# Programming Myanmar


hello world ႔

Textbox ႔ label

================
Save
Textbox
Label (label )
================


15 C# Programming Myanmar

label ႔ textbox ႕
16 C# Programming Myanmar


Save button
Save button

[Link] = [Link];

Run textbox save button


Programming
႔ chat box java

Data types and Variables

programming language ႔

႔ ႔ ႔
Variable ႔ Data computer memory (RAM)

Data ႔
data type

၁ Declaration (data type )


၂ Definition ( ႕ )//
၃ assign (data )
variable
17 C# Programming Myanmar

program
18 C# Programming Myanmar

Int number integer data type = assignment operator textbox


number textbox String
[Link](); method
textbox number
number ႕ int ႔ Error

[Link]([Link]());
number MessageBox ႔ ႔ Show() method
Messagebox (string) number
Tostring() method ႔
calculator textbox label

Button
Label
Textbox

Properties
19 C# Programming Myanmar

textbox

from ႕ Text calculator ႔

code

calculator ႔
၁ textbox ၂
၂ textbox ၂

၄ amount ႔ textbox ၄ ႔
20 C# Programming Myanmar

textbox ႔ textbox ၂

+ double click

int number1 = [Link]([Link]);


int number2 = [Link]([Link]);
int amount = number1 + number2;

[Link] = [Link]();

Run

int number1 ႔ txtfirstnumber textbox

[Link]();

int number2 ႔ txtsecondnumber textbox

int amount = number1 + number2;


amount int integer type number1 + number2
= assignment operator

amount

txtamount amount textbox


Textbox amount

[Link]=[Link]();
ToString() method
21 C# Programming Myanmar

command

/**
int number1 = [Link]([Link]);
int number2 = [Link]([Link]);
int amount = number1 + number2;

[Link] = [Link]();
* */

[Link]= txtfirstnumber .Text + [Link];

Textbox ႔
22 C# Programming Myanmar

if statement

If statement ႔

Operator Description Example


== ႔ ႔ true A==B
A ႔B
?
!= ႔ ႔ true A!=B
A ႔B
?
> 1>2
႔ ၁ ၂
?
< 1<2
႔ ၁ ၂
?
>= 1>=2
႔ ၁ ၂
႔ ?
( ) ႔
<= 1>=2
႔ ၁ ၂
႔ ?
( ) ႔

=
Programming = assign
23 C# Programming Myanmar

If( )
{

}
Else
{

if ႔ () {}
If ႔ {}
Else ႔ if else

Calculator
Windows form frmcalculator ႔

Textbox
Button 3
24 C# Programming Myanmar

၁ textbox

၃ textbox variable
textbox ႔ )
၅ textbox variable
႔ textbox textbox

-
၁ (click event)
၂ variable (int number= [Link]([Link]))
၃ textbox ([Link]())
၄ (number+[Link]([Link]))

Plus ႔ Minus user


႔ variable
string myoperator; ႔

btnplus ႕ click event ႔

btnminus
25 C# Programming Myanmar

== ႔ =

if (myoperator == "+")
{
[Link] = [Link](number +
[Link]([Link]));
}
else if (myoperator == "-")
{
[Link] = [Link](number -
[Link]([Link]));
}

+ button myoperator + ႔
if ႔
myoperator + ႔ number ႔ textbox textbox

႔ + - if

myoperator - ႔ else if
26 C# Programming Myanmar

႔ relational operator

calculator ႕

႔ select Font properties


27 C# Programming Myanmar

btnZero ႕ btn ႔ ႔
Textbox txtResult ႔

namespace Calculator
{
public partial class FrmCalculator : Form
{
public FrmCalculator()
{
InitializeComponent();
}

private void btnZero_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "0";
}
else
{
[Link] += "0";
}
}

private void btnDzero_Click(object sender, EventArgs e)


{
if ([Link] == "0" || [Link]=="00")
{
[Link] = "0";
}
else
{
[Link] += "00";
}
}

private void btnDot_Click(object sender, EventArgs e)


{
if ([Link] == "0")
28 C# Programming Myanmar

{
[Link] = "0";
}
else
{
[Link] += ".";
}
}

private void btnOne_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "1";
}
else
{
[Link] += "1";
}
}

private void btnTwo_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "2";
}
else
{
[Link] += "2";
}
}

private void btnThree_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "3";
}
else
29 C# Programming Myanmar

{
[Link] += "3";
}
}

private void btnFour_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "4";
}
else
{
[Link] += "4";
}
}

private void btnFive_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "5";
}
else
{
[Link] += "5";
}

private void btnSix_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "6";
}
else
{
[Link] += "6";
}
30 C# Programming Myanmar

private void btnSeven_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "7";
}
else
{
[Link] += "7";
}
}

private void btnEight_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "8";
}
else
{
[Link] += "8";
}
}

private void btnNine_Click(object sender, EventArgs e)


{
if ([Link] == "0")
{
[Link] = "9";
}
else
{
[Link] += "9";
}
}

private void btnClear_Click(object sender, EventArgs e)


{
31 C# Programming Myanmar

[Link] = "0";
}

private void btnBack_Click(object sender, EventArgs e)


{
[Link] = [Link]([Link] - 1, 1);
}
}
}

႔ clear backspace zero

string operation;
double num1;

private void btnEqul_Click(object sender, EventArgs e)


{
if (num1 != null && operation=="+")
{
[Link] = [Link](num1 + [Link]([Link]));
}
else if (num1 != null && operation == "-")
{
[Link] = [Link](num1 - [Link]([Link]));
}
else if (num1 != null && operation == "*")
{
[Link] = [Link](num1 * [Link]([Link]));
}
else if (num1 != null && operation == "/")
{
[Link] = [Link](num1 / [Link]([Link]));
}
else if (num1 != null && operation == "%")
{
[Link] = [Link](num1 % [Link]([Link]));
}
}
32 C# Programming Myanmar

private void btnPlus_Click(object sender, EventArgs e)


{
num1 = [Link]([Link]);
[Link]();
operation = "+";
}

private void btnMinus_Click(object sender, EventArgs e)


{
num1 = [Link]([Link]);
[Link]();
operation = "-";
}

private void btnMultiple_Click(object sender, EventArgs e)


{
num1 = [Link]([Link]);
[Link]();
operation = "*";
}

private void btnDiv_Click(object sender, EventArgs e)


{
num1 = [Link]([Link]);
[Link]();
operation = "/";
}

private void btnModule_Click(object sender, EventArgs e)


{
num1 = [Link]([Link]);
[Link]();
operation = "%";
}

string operation; double num1; + + ႔ +-/*


string operation
႔ ႔+ ႔ ႔ num1
႔ num1

You might also like