일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- CNN
- imread
- Button
- ipad
- Series
- pip
- GT-S80
- synology
- 삼성소프트웨어멤버십
- javascript
- GitHub
- SPL
- LSTM
- mariadb
- index
- mean
- dataframe
- RNN
- DFS
- keras
- Python
- install
- pycharm
- pandas
- SciPy
- E-P1
- Lotto
- Splunk
- Numpy
- 알고리즘
- Today
- Total
잠토의 잠망경
학교 강의 내용 1st 본문
Charles Petzold의 내용을 실습했습니다.
Date.cs
==================================================================================
using System;
class PropertyTest
{
static void Main()
{
Date dateMoonWalk = new Date();
try
{
dateMoonWalk.Year = 1969;
dateMoonWalk.Month = 12;
dateMoonWalk.Day = 20;
Console.WriteLine("Moon walk: {0}, Day of Year: {1}",
dateMoonWalk, dateMoonWalk.DayOfYear());
}
catch (Exception e)
{
if(e.ToString() == "Year")
{
Console.WriteLine("Wrong Year");
}
else if (e.ToString() == "Month")
{
Console.WriteLine("Wrong Month");
}
else
{
Console.WriteLine("Wrong Day");
}
}
}
}
===================================================================================
PropertyTest.cs
===================================================================================
using System;
class PropertyTest
{
static void Main()
{
Date dateMoonWalk = new Date();
dateMoonWalk.Year = 1969;
dateMoonWalk.Month = 7;
dateMoonWalk.Day = 20;
Console.WriteLine("Moon walk: {0}, Day of Year: {1}",
dateMoonWalk, dateMoonWalk.DayOfYear());
}
}
===================================================================================
실행화면