-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path014_Ex01.cs
43 lines (38 loc) · 933 Bytes
/
014_Ex01.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
namespace Ex01
{
public class Cls1
{
private string name;
private int age;
public event EventHandler NameChanged;
public MyCustomer()
{
name = string.Empty;
age = -1;
}
public string Name
{
get { return this.name; }
set
{
if(this.name != value)
{
thus.name = value;
if (NameChanged != null)
{
Namechanged(this, EnentArgs.Empty);
}
}
}
}
public int age{
get { return this.age; }
set { this.age = value; }
}
public string GetCusData()
{
string data = string.Format("Name : {0} (age : {1})", this.name, this.age);
return data;
}
}
}