<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>hanaaaaaachiru</author_name>
  <author_url>https://blog.hatena.ne.jp/hanaaaaaachiru/</author_url>
  <blog_title>はなちるのマイノート</blog_title>
  <blog_url>https://www.hanachiru-blog.com/</blog_url>
  <categories>
    <anon>C#</anon>
  </categories>
  <description>はじめに 今回はStructLayoutとLayoutKind.Explicitを用いて指定したメモリ領域を別の型として解釈する方法について紹介したいと思います。 別の型として解釈する例(bool + byte + ushort =&gt; int) はじめに 別の型として解釈する StructLayoutとは Unsafe.As 参考 別の型として解釈する StructLayoutAttributeとLayoutKind.Explicitを上手に組み合わせることで、本来はキャストできないような別な型として解釈させることができます。 // サンプル : bool(1byte) + byte(1byt…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.hanachiru-blog.com%2Fentry%2F2023%2F10%2F26%2F120000&quot; title=&quot;【C#】メモリレイアウトを制御できるStructLayout &amp;amp;LayoutKind.Explicitを用いて別の型として解釈する(あとUnsafe.Asを利用した例も) - はなちるのマイノート&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/h/hanaaaaaachiru/20230903/20230903234857.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2023-10-26 12:00:00</published>
  <title>【C#】メモリレイアウトを制御できるStructLayout &amp;LayoutKind.Explicitを用いて別の型として解釈する(あとUnsafe.Asを利用した例も)</title>
  <type>rich</type>
  <url>https://www.hanachiru-blog.com/entry/2023/10/26/120000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
