Created
September 19, 2025 16:51
-
-
Save kevingosse/ef8461ecfe5cd0241cf79b447d91b55f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace ConsoleApp1; | |
internal unsafe class Program | |
{ | |
private struct StructWithFixedBuffer | |
{ | |
public StructWithFixedBuffer() | |
{ | |
} | |
public fixed long buffer[1]; | |
} | |
public static void Main(string[] args) | |
{ | |
for (int i = 0; i < 10; i++) | |
{ | |
var a = new StructWithFixedBuffer(); | |
Console.WriteLine($"{a.buffer[0]} "); | |
a.buffer[0]++; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment