Guest User

Untitled

a guest
Jun 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. using System;
  2.  
  3. namespace test
  4. {
  5. class MainClass
  6. {
  7. struct h4x {
  8. // Fixed arrays can only be properties of structs
  9. unsafe public fixed ushort test[512];
  10. };
  11.  
  12. unsafe public static void Main (string[] args)
  13. {
  14. h4x t = new h4x();
  15.  
  16. // This pointer will point to test as a continous array of bytes
  17. byte* b = (byte*)&t.test;
  18. }
  19. }
  20. }
Add Comment
Please, Sign In to add comment