FiftyTifty
✅ Creating a single global object that can be accessed by other classes?
I'm someone who comes from using Pascal and Lua, so bear with me here.
I want to create a single nested list with custom properties, which I can then iterate through. But it's not intuitive how we actually do that. To demonstrate, here is a snippet of the code I'm working on for Bannerlord:
I only need one instance of
tsClassroom
, and I'll handle clearing it out and refilling it. But a single instance would be a public static
, which can't have objects assigned to it right?
public static List<tsClassroom> = new List<tsClassroom>
is not supported in C#, so I'm a bit lost, even if it's obvious to others 🐤43 replies