
1 // DivideByZeroTest.cs
2
3 using System;
4 using System.Drawing;
5 using System.Collections;
6 using System.ComponentModel;
7 using System.Windows.Forms;
8 using System.Data;
9
10 public class DivideByZeroTest : System.Windows.Forms.Form
11 {
12 private System.Windows.Forms.Label numeratorLabel;
13 private System.Windows.Forms.TextBox numeratorTextBox;
14
15 private System.Windows.Forms.Label denominatorLabel;
16 private System.Windows.Forms.TextBox denominatorTextBox;
17
18 private System.Windows.Forms.Button divideButton;
19 private System.Windows.Forms.Label outputLabel;
20
25 // Yêu c u bi n thi t kầ ế ế ế
26 private System.ComponentModel.Container components = null;
27
28 // C u trúc m c đ nhấ ặ ị
29 public DivideByZeroTest()
30 {
32 InitializeComponent();
33 }
34
Nh ng h th ng c b n ữ ệ ố ơ ả
c a c ch x lý ngo i ủ ơ ế ử ạ
l trong C# ệ
L p th hi n cách x lý ớ ể ệ ử
ngo i l t phép chia cho ạ ệ ừ
s 0 trong toán h c s ố ọ ố
nguyên và trong đ nh d ng ị ạ
s h c không chính xácố ọ
Đòi h i h tr b ng ỏ ỗ ợ ằ
thi t k d ng c a s ế ế ạ ử ổ
DivideByZeroTest.cs