<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>bleis-tift</author_name>
  <author_url>https://blog.hatena.ne.jp/bleis-tift/</author_url>
  <blog_title>ぐるぐる～</blog_title>
  <blog_url>https://bleis-tift.hatenablog.com/</blog_url>
  <categories>
    <anon>C#</anon>
    <anon>.NET</anon>
    <anon>Memo</anon>
  </categories>
  <description>C++の構造体とクラスはデフォルトのアクセスレベルが違うだけで、それ以外は全く同じだが、C#の構造体とクラスはかなりの違いがある。 class struct 格納場所 ヒープ スタック*1 継承 可 不可*2 *3 メンバの制限 なし あり*4 フィールドの宣言箇所での初期化 可能 不可能 コレクションとの相性 良い 悪い*5 また、ボックス化解除は明示的に行わなければならないのに、ボックス化は何も考えずにできるから思わぬところでボックス化が起こったりする点も注意が必要。 int i = 0; // ここで勝手にボックス化 Console.WriteLine(&quot;{0}&quot;, i); // 勝手に…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fbleis-tift.hatenablog.com%2Fentry%2F20071214%2F1197621485&quot; title=&quot;構造体 - ぐるぐる～&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2007-12-14 17:38:05</published>
  <title>構造体</title>
  <type>rich</type>
  <url>https://bleis-tift.hatenablog.com/entry/20071214/1197621485</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
