Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace test
- {
- class MainClass
- {
- struct h4x {
- // Fixed arrays can only be properties of structs
- unsafe public fixed ushort test[512];
- };
- unsafe public static void Main (string[] args)
- {
- h4x t = new h4x();
- // This pointer will point to test as a continous array of bytes
- byte* b = (byte*)&t.test;
- }
- }
- }
Add Comment
Please, Sign In to add comment