using System;
public unsafe struct AStruct
{
public fixed int arr[64];
}
namespace ConsoleApplication_C_Sharp
{
class Program
{
static AStruct _astruct;
static void Main(string[] args)
{
Set();
Print();
}
unsafe static void Set()
{
fixed (int* _arr = _astruct.arr)
{
_arr[0] = 88;
_arr[12] = 123;
_arr[34] = 345;
}
}
unsafe static void Print()
{
fixed (int* _arr = _astruct.arr)
{
Console.WriteLine(_arr[0]);
Console.WriteLine(_arr[12]);
Console.WriteLine(_arr[34]);
}
}
}
}
/*
run:
88
123
345
*/