DEV Community

Ben Gristwood
Ben Gristwood

Posted on

Best Practice - structures

I have a structure in c#, I'm using it within a class in order to store data. what is best practice here? thinking dependency injection. I know how i would do it, but I'm also thinking about what is current trend. #bestpractice

is it to pass the struct back and forwards in and out of modules or just to have a global stuct declaration for that class and use that throughout?

All modules within the class are related to the struct and all access it.

Top comments (0)