captainbulba
captainbulba
CC#
Created by captainbulba on 1/30/2023 in #help
Storing login data
yep, that makes sense. thanks a lot
9 replies
CC#
Created by captainbulba on 1/30/2023 in #help
Storing login data
Sorry, just to clarify. I would still store my User in the static in order to get info from anywhere. Do I follow it correctly?
public static Pet pet;

// somewhere

pet = new Pet()
{
Name = "Bob",
Age = 12
};

// later

Console.WriteLine("Welcome " + StartMenu.pet.Name);
public static Pet pet;

// somewhere

pet = new Pet()
{
Name = "Bob",
Age = 12
};

// later

Console.WriteLine("Welcome " + StartMenu.pet.Name);
9 replies
CC#
Created by captainbulba on 1/30/2023 in #help
Storing login data
aha, got it. Thanks
9 replies