ソースコードを綺麗にHTMLで表示したいと思いいろいろ探しましたが、
CodePublisherが気に入りました。
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. |
44. |
45. |
46. |
47. |
48. |
|
Public Class employee |
|
Private _name As String |
Private _birthday As Date |
|
|
|
|
Property Name() As String |
Get |
Return _name |
End Get |
Set(ByVal Value As String) |
_name = Value |
End Set |
End Property |
|
|
|
|
Property Birthday() As Date |
Get |
Return _birthday |
End Get |
Set(ByVal Value As Date) |
_birthday = Value |
End Set |
End Property |
|
|
|
|
ReadOnly Property Age() As Integer |
Get |
|
Dim _age As Integer = _ |
CType(Today.ToString("yyyy"), Integer) - _ |
CType(_birthday.ToString("yyyy"), Integer) |
|
If CType(Today.ToString("MMdd"), Integer) < _ |
CType(_birthday.ToString("MMdd"), Integer) Then |
_age = _age - 1 |
End If |
Return _age |
End Get |
End Property |
End Class |
|
|
0 件のコメント:
コメントを投稿