﻿{"id":385,"date":"2023-01-11T15:52:19","date_gmt":"2023-01-11T12:52:19","guid":{"rendered":"http:\/\/www.eyurtsever.com\/?p=385"},"modified":"2023-01-11T15:52:19","modified_gmt":"2023-01-11T12:52:19","slug":"asp-net-c-doviz-kuru-cekmek","status":"publish","type":"post","link":"https:\/\/www.eyurtsever.com\/index.php\/asp-net-c-doviz-kuru-cekmek","title":{"rendered":"ASP.NET (C#) D\u00f6viz Kuru \u00c7ekmek"},"content":{"rendered":"<p>Asp.net ile merkez bankas\u0131ndan xml ile d\u00f6viz kurlar\u0131n\u0131 a\u015fa\u011f\u0131daki kodlar ile \u00e7ekebilirsiniz.<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<pre class=\"EnlighterJSRAW\">XmlDocument xmlVerisi = new XmlDocument();\nxmlVerisi.Load(\"http:\/\/www.tcmb.gov.tr\/kurlar\/today.xml\");\ndecimal dolar = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format(\"Tarih_Date\/Currency[@Kod='{0}']\/ForexSelling\", \"USD\")).InnerText.Replace('.', ','));\ndecimal Euro = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format(\"Tarih_Date\/Currency[@Kod='{0}']\/ForexSelling\", \"EUR\")).InnerText.Replace('.', ','));\nLabel1.Text = dolar.ToString();\nLabel2.Text = Euro.ToString();\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Asp.net ile merkez bankas\u0131ndan xml ile d\u00f6viz kurlar\u0131n\u0131 a\u015fa\u011f\u0131daki kodlar ile \u00e7ekebilirsiniz. &nbsp; &nbsp; XmlDocument xmlVerisi = new XmlDocument(); xmlVerisi.Load(&#8220;http:\/\/www.tcmb.gov.tr\/kurlar\/today.xml&#8221;); decimal dolar = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format(&#8220;Tarih_Date\/Currency[@Kod='{0}&#8217;]\/ForexSelling&#8221;, &#8220;USD&#8221;)).InnerText.Replace(&#8216;.&#8217;, &#8216;,&#8217;)); decimal Euro = Convert.ToDecimal(xmlVerisi.SelectSingleNode(string.Format(&#8220;Tarih_Date\/Currency[@Kod='{0}&#8217;]\/ForexSelling&#8221;, &#8220;EUR&#8221;)).InnerText.Replace(&#8216;.&#8217;, &#8216;,&#8217;)); Label1.Text = dolar.ToString(); Label2.Text = Euro.ToString();<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4,13],"tags":[51,122,139],"_links":{"self":[{"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/posts\/385"}],"collection":[{"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/comments?post=385"}],"version-history":[{"count":2,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/posts\/385\/revisions"}],"predecessor-version":[{"id":627,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/posts\/385\/revisions\/627"}],"wp:attachment":[{"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/media?parent=385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/categories?post=385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.eyurtsever.com\/index.php\/wp-json\/wp\/v2\/tags?post=385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}