Skip to content

Commit 7adfaf1

Browse files
committed
2 parents 347468d + dc9c21f commit 7adfaf1

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,16 @@ My sample atm project[GitHub Pages](https://github.com/oguzhanKomcu/CSharp__Fund
2727
My sample dice game project[GitHub Pages](https://github.com/oguzhanKomcu/CSharp__Fundamentals/blob/master/Custom_Functions/DiceGame.cs)
2828

2929
My sample bus ticket project[GitHub Pages](https://github.com/oguzhanKomcu/CSharp__Fundamentals/blob/master/Custom_Functions/BusTicketApp.cs)
30+
31+
## VOİDS METHODS
32+
Methods defined as void do not return a value. It is one of the most frequently used methods by developers. The void method takes parameters like any other method. It is used when there is no need to take a value.
33+
### OVERLOAD
34+
We can create more than one method with the same name, but we cannot process the same parameters to overloaded methods.
35+
### OUT
36+
Out is used when it returns multiple values.
37+
My sample bus ticket project[GitHub Pages](https://github.com/oguzhanKomcu/CSharp__Fundamentals/blob/master/VOID_METHODS1/Form1.cs)
38+
## TRY - CATCH
39+
It is a structure that prevents errors in the code blocks we have written. In fact, the prevention of errors is not meant to prevent the error, but to prevent the related program from giving an error to the end user. When the user receives an error, he can directly convey the error to us via e-mail.
40+
41+
My sample bus ticket project[GitHub Pages](https://github.com/oguzhanKomcu/CSharp__Fundamentals/blob/master/Try_Catch1/Form1.cs)
42+

VOID_METHODS1/Form1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ public Form1()
77
InitializeComponent();
88
}
99

10-
//VOÝD METHODS
10+
//VOID METHODS
1111

1212
void SpeedFormula(int path, int time)
1313
{
1414
int speed = path / time;
1515
MessageBox.Show($"Your Speed : {speed} km/s");
1616
}
1717

18-
18+
//CONTROLA
1919
private void btnCalculate1_Click(object sender, EventArgs e)
2020
{
2121
SpeedFormula(int.Parse(textPath.Text), int.Parse(textTime.Text));
@@ -80,4 +80,4 @@ private void btnCalculate3_Click(object sender, EventArgs e)
8080
MessageBox.Show($"Discount difference to the product: {(Math.Round(discountamount, 2))} TL\nPercentage of discount on the product: {(Math.Round(percent))} %");
8181
}
8282
}
83-
}
83+
}

0 commit comments

Comments
 (0)