Microsoft docs say the following :
A static constructor is used to initialize any static data
Lets say I have this code :
class Animal
{
static string name;
static Animal()
{
Animal.name = "Jack";
}
}
Is there a difference if I would declare the static name outside of the static constructor like this :
static string name = "Jack"
What is normally done in real world examples ? The first or the latter.