I have a template in C++ that looks like this:
Note that T can be different kind of structs and each one has "member1" but the size for each struct can be different.
C#:
template<typename T>
static void initStruct(T* t)
{
memset(t, 0, sizeof(T));
t->member1 = [something];
}
Last edited by a moderator: