Assume that we have the following struct
definition that uses generics:
public struct Foo
{
public T First;
public T Second;
The other answers explain the behaviour correctly, but neglect to mention the second part of your question, so here it is for completion.
When you don't explicitly define a constructor, the compiler will produce a default constructor which assigns default values (e.g. null
for objects, 0
for numbers etc.) to every field.