2 ms·
C# arrays are 'object', aka "Reference Type". The only reason I'm responding the way I do is because GPT-3 is too known for writing elaborate texts despite cons
by neonsunset 4y ago
C# arrays are 'object', aka "Reference Type". The only reason I'm responding the way I do is because GPT-3 is too known for writing elaborate texts despite consistently getting fundamentals wrong. Your previous reply directly contradicts runtime implementation so I see no reason to apologize for my statements.
In addition, regarding Span<T> and other ref structs, they can hold any type and have no restriction to T : unmanaged. That's because objects by their nature of being on the heap are guaranteed to outlive the lifetime of any ref struct and the runtime supports tracking GC references held like this anyway.