{"id":313,"date":"2022-10-15T09:29:02","date_gmt":"2022-10-15T01:29:02","guid":{"rendered":"https:\/\/islandtropicaman.com\/wp\/?p=313"},"modified":"2022-10-15T09:29:02","modified_gmt":"2022-10-15T01:29:02","slug":"displays-a-number-in-hexadecimal-in-power-shell","status":"publish","type":"post","link":"https:\/\/islandtropicaman.com\/wp\/2022\/10\/15\/displays-a-number-in-hexadecimal-in-power-shell\/","title":{"rendered":"Displays a number in Hexadecimal in Power Shell"},"content":{"rendered":"<p>In this example let us use the Power Shell format operator to turn a base 10 number into a Hexadecimal number. The command is as follows:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&quot;0X{0:X}&quot; -f 21\r\n<\/pre>\n<p>What the above command does is turns number 21 into an uppercase Hexadecimal number as follows:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n0X15\r\n<\/pre>\n<p>If you prefer lowercase Hexadecimal numbers instead then you can use the below command:<\/p>\n<pre class=\"brush: php; title: ; notranslate\" title=\"\">\r\n&quot;0x{0:x}&quot; -f 21\r\n<\/pre>\n<p>The -f operator is actually the shorthand method of the System.String class&#8217;s Format method. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this example let us use the Power Shell format operator to turn a base 10 number into a Hexadecimal number. The command is as follows: &quot;0X{0:X}&quot; -f 21 What the above command does is turns number 21 into an uppercase Hexadecimal number as follows: 0X15 If you prefer lowercase Hexadecimal numbers instead then you&#8230;<\/p>\n<p class=\"more-link-wrap\"><a href=\"https:\/\/islandtropicaman.com\/wp\/2022\/10\/15\/displays-a-number-in-hexadecimal-in-power-shell\/\" class=\"more-link\">Read More<span class=\"screen-reader-text\"> &ldquo;Displays a number in Hexadecimal in Power Shell&rdquo;<\/span> &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[78],"tags":[93],"class_list":["post-313","post","type-post","status-publish","format-standard","hentry","category-power-shell","tag-power-shell-format"],"blog_post_layout_featured_media_urls":{"thumbnail":"","full":""},"categories_names":{"78":{"name":"Power Shell","link":"https:\/\/islandtropicaman.com\/wp\/category\/power-shell\/"}},"tags_names":{"93":{"name":"power shell format","link":"https:\/\/islandtropicaman.com\/wp\/tag\/power-shell-format\/"}},"comments_number":"0","_links":{"self":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/313","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/comments?post=313"}],"version-history":[{"count":1,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/313\/revisions"}],"predecessor-version":[{"id":314,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/posts\/313\/revisions\/314"}],"wp:attachment":[{"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/media?parent=313"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/categories?post=313"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/islandtropicaman.com\/wp\/wp-json\/wp\/v2\/tags?post=313"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}