When is array allocated on stack in c#?
10 int structs would be allocated on the the heap, only pointer to them would be on stack, correct? Yes, correct. How would one make fixed size array to go on stack? What if I’m using stucts I defined? The stackalloc keyword serves this purpose. However, this works in unsafe context only, which is a … Read more