[英]C# store int and bytes inside two dimensional array
有沒有辦法在二維數組中存儲int和字節?
例如:
int[,] WeaponAddresses = new int[,] { { 0x4F0, 00 00 00 00 00 00 00 00 04 05 01 01 01 01 01 01 } };
我將不勝感激
創建一個具有int和byte屬性的結構,並聲明該結構的一維數組。
public struct MyObj { public int IntValue {get;set;} public byte[] ByteValue {get;set;} } public class TestClass { MyObj[] arrayOfObjects; }
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.