예제 #1
0
파일: Program.cs 프로젝트: gywerd/As3Json
        static void Main(string[] args)
        {
            Exchange    CEX = new Exchange();
            DollarRates CDR = CEX.GetCurrencyFromOpenExchangeRate();

            Console.WriteLine(CDR.rates["DKK"].ToString());

            foreach (var item in CDR.rates)
            {
                Console.WriteLine("{0} {1}", item.Key, item.Value);
            }

            foreach (var item in CDR.RateList)
            {
                Console.WriteLine("{0} {1}", item.country, item.value);
            }

            Console.ReadLine();
        }
예제 #2
0
        static void Main(string[] args)
        {
            ClassBIZ    CB = new ClassBIZ();
            ClassDollar cd = new ClassDollar();
            DollarRates DR = CB.useJSON(cd.GetValutaFromOpenExchangeRates());

            Console.WriteLine(DR.Rates["DKK"].ToString());

            foreach (var item in DR.Rates)
            {
                Console.WriteLine("{0} {1}", item.Key, item.Value);
            }
            Console.WriteLine();

            foreach (var item in DR.RatesList)
            {
                Console.WriteLine("{0} {1}", item.Country, item.Value);
            }
            Console.ReadLine();
        }
예제 #3
0
        public DollarRates useJSON(string value)
        {
            DollarRates DR = JsonConvert.DeserializeObject <DollarRates>(value);

            return(DR);
        }