How to create an uninitialized 2D array?
C# allows you to create an array without it being initialized with GC.AllocateUnitializedArray<T>
. T
can be any type, such as bool
or int
. However, I do not know of a way to do this to a 2D array, e.g. bool[,]
or int[,]
.
allocate as std::byte[10], deallocate as short*
I come to C and C++ from Assembly before 2.5 decades.
allocate as int[10], deallocate as short*
I come to C and C++ from Assembly before 2.5 decades.
When to use ReadOnlySpan vs explicit / overloaded types
For the sake of the ensuing question, assume hypothetically that I want to convert a plain-text string into a hexadecimal string; for example, “Hello, World!” into “48656c6c6f2c20576f726c6421”.