{"id":345,"date":"2018-10-11T09:23:17","date_gmt":"2018-10-11T09:23:17","guid":{"rendered":"https:\/\/ibex.tech\/csharp\/?p=345"},"modified":"2022-02-17T06:24:14","modified_gmt":"2022-02-17T06:24:14","slug":"converting-variables","status":"publish","type":"post","link":"https:\/\/ibex.tech\/csharp\/c-sharp\/memory\/converting-variables","title":{"rendered":"Converting Variables"},"content":{"rendered":"<h4>\n\tConvert Float \/ Single to Bytes<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tfloat float1 = 1.0F;\r\n\tByte[] ByteArray1 = BitConverter.GetBytes(float1);\r\n<\/code><\/pre>\n<h4>\n\tConvert Bytes to Float\/Single<br \/>\n<\/h4>\n<pre>\r\n<code>\r\n\tByte[] ByteArray1 = new Byte[4] {1,2,3,4};\r\n\tfloat float1 = BitConverter.ToSingle(ByteArray1, 0);\r\n<\/code><\/pre>\n<p>\n\t&nbsp;\n<\/p>\n<p>\n\t&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert Float \/ Single to Bytes float float1 = 1.0F; Byte[] ByteArray1 = BitConverter.GetBytes(float1); Convert Bytes to Float\/Single Byte[] ByteArray1 = new Byte[4] {1,2,3,4}; float float1 = BitConverter.ToSingle(ByteArray1, 0); &nbsp; &nbsp;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-345","post","type-post","status-publish","format-standard","hentry","category-memory"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/345","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/comments?post=345"}],"version-history":[{"count":1,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/345\/revisions"}],"predecessor-version":[{"id":346,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/posts\/345\/revisions\/346"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/media?parent=345"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/categories?post=345"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/csharp\/wp-json\/wp\/v2\/tags?post=345"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}