I want to have an object that is of a custom class type that I have designed, and I want that object to persist across various form methods being called, so that the object can be accessed from different event methods and the data will persist, but I haven't
found any way to do this searching google except using static. I have a hard time believing that the designers at Microsoft would have made static types the only way to have an object persist across multiple calls, even though I read someone saying this on
a forum when I was searching on this topic. I know "global" isn't the best design choice so it doesn't exist in C#, but it could be argued that static isn't always ideal either. Someone please tell me there's a better way to do this. Anyone have
info on this?
↧