Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
論理値の2次元配列をc#に格納して、スペースを最小限に抑えるにはどうすればよいですか?
32列が必要な場合は、32ビット整数を使用し、ビット単位の演算を使用してオフビットをオンにすることができます。
私はいつもCでこれを行っていますが、C#でも機能するはずです
BitArrayは、論理値ごとに1ビットを使用します。最も効率的なのは、独自の2次元BitArrayを実装することです。.NETリフレクターを使用してBitArrayソースコードを取得します。