{"id":55,"date":"2012-10-23T23:51:16","date_gmt":"2012-10-23T14:51:16","guid":{"rendered":"https:\/\/www.xenos.jp\/~zen\/blog2\/?p=55"},"modified":"2017-11-29T23:52:52","modified_gmt":"2017-11-29T14:52:52","slug":"post-55","status":"publish","type":"post","link":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/2012\/10\/23\/post-55\/","title":{"rendered":"VB.NET\u3067\u6d88\u8cbb\u7a0e\u306e\u8a08\u7b97\u3092\u3059\u308b"},"content":{"rendered":"<p>\u6d88\u8cbb\u7a0e\u3092\u8a08\u7b97\u3059\u308b\u5834\u5408\u3001\u539f\u5247\u3068\u3057\u30661\u5186\u672a\u6e80\u306e\u5834\u5408\u306f\u5207\u308a\u6368\u3066\u3092\u884c\u3046\u3002<br \/>\n\uff08\u305f\u3060\u3057\u3001\u56db\u6368\u4e94\u5165\u3082\u8a8d\u3081\u3089\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u56db\u6368\u4e94\u5165\u3092\u3057\u3066\u3082\u9593\u9055\u3048\u3067\u306f\u306a\u3044\u3002\uff09<\/p>\n<p>VB\u3067\u6d88\u8cbb\u7a0e\u8a08\u7b97\u3092\u3059\u308b\u5834\u5408\u306f\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3092\u5207\u308a\u6368\u3066\u308b\u305f\u3081\u306b Math.Floor() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n<p>\u25a0\u4f8b\uff09<\/p>\n<pre> Dim TaxRate As Double = 0.05\r\n Dim UnitPrice As Integer = 103\r\n Dim Total As Integer\r\n \r\n Total = Math.Floor(UnitPrice * TaxRate)\r\n<\/pre>\n<p>\u25a0\u7d50\u679c\uff1a\u5207\u308a\u6368\u3066\u3057\u306a\u3044\u5834\u5408\u306b\u306f108.15\u3001\u5207\u308a\u6368\u3066\u306b\u3088\u308a108\u306b\u306a\u308b\u3002<\/p>\n<p>\u8a08\u7b97\u7d50\u679c\u306b\u5bfe\u3057\u3066\u3001Math.Floor\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u308a\u3001<br \/>\n\u5207\u308a\u6368\u3066\u305f\u6570\u3092Integer\u578b\u306b\u3044\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u3061\u306a\u307f\u306b\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3092\u5207\u308a\u4e0a\u3052\u3057\u305f\u3044\u5834\u5408\u306b\u306f\u3001Math.Ceiling() \u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3002<\/p>\n<p>\u4ed6\u306e\u65b9\u6cd5\u3068\u3057\u3066\u306f\u3001ToString() \u30e1\u30bd\u30c3\u30c9\u3067\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3092\u307e\u308b\u3081\u308b\u3053\u3068\u3082\u3067\u304d\u308b\u3002<br \/>\n\u5909\u6570.ToString(&#8220;C&#8221;) \u3092\u6307\u5b9a\u3059\u308b\u3053\u3068\u3067\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3092\u56db\u6368\u4e94\u5165\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n<p>\u25a0\u4f8b\uff09<\/p>\n<pre> Dim TaxRate As Double = 0.05\r\n Dim UnitPrice As Integer = 103\r\n Dim TotalTemp As Double\r\n Dim Total As Integer\r\n \r\n TotalTemp = UnitPrice * TaxRate\r\n Total = TotalTemp.ToString(\"C\")\r\n<\/pre>\n<p>\u3053\u306e\u65b9\u6cd5\u3067\u3082\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u306e\u8868\u793a\u306f\u306a\u304f\u305b\u308b\u304c\u3001\u56db\u6368\u4e94\u5165\u306b\u306a\u308b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6d88\u8cbb\u7a0e\u3092\u8a08\u7b97\u3059\u308b\u5834\u5408\u3001\u539f\u5247\u3068\u3057\u30661\u5186\u672a\u6e80\u306e\u5834\u5408\u306f\u5207\u308a\u6368\u3066\u3092\u884c\u3046\u3002 \uff08\u305f\u3060\u3057\u3001\u56db\u6368\u4e94\u5165\u3082\u8a8d\u3081\u3089\u308c\u3066\u3044\u308b\u306e\u3067\u3001\u56db\u6368\u4e94\u5165\u3092\u3057\u3066\u3082\u9593\u9055\u3048\u3067\u306f\u306a\u3044\u3002\uff09 VB\u3067\u6d88\u8cbb\u7a0e\u8a08\u7b97\u3092\u3059\u308b\u5834\u5408\u306f\u3001\u5c0f\u6570\u70b9\u4ee5\u4e0b\u3092\u5207\u308a\u6368\u3066\u308b\u305f\u3081\u306b Math.Floo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,5],"tags":[],"class_list":["post-55","post","type-post","status-publish","format-standard","hentry","category-vbdotnet","category-tech"],"_links":{"self":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/55","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/comments?post=55"}],"version-history":[{"count":1,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/55\/revisions"}],"predecessor-version":[{"id":56,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/posts\/55\/revisions\/56"}],"wp:attachment":[{"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/media?parent=55"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/categories?post=55"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenos.jp\/~zen\/blog2\/index.php\/wp-json\/wp\/v2\/tags?post=55"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}