using System.Collections.Generic;
public static void Main()
List<주가> stockList = new List<주가>();
stockList.Add(new 주가(){일자="20200101",시가=1000,고가=1500,저가=800,종가=900,거래량=10000});
stockList.Add(new 주가(){일자="20200102",시가=900,고가=1500,저가=800,종가=1100,거래량=15000});
stockList.Add(new 주가(){일자="20200103",시가=1000,고가=1200,저가=500,종가=800,거래량=12000});
foreach (var item in stockList)
Console.WriteLine("일자:{0}, 시가:{1}, 고가:{2}, 저가:{3}, 종가:{4}, 거래량:{5}", item.일자, item.시가, item.고가, item.저가, item.종가, item.거래량);
public string 일자 {get; set;}
public int 시가 {get; set;}
public int 고가 {get; set;}
public int 저가 {get; set;}
public int 종가 {get; set;}
public int 거래량 {get; set;}