I find that higher is more efficient than using a class?
Absolutely not. This is a terrible structure . Structures should be small; no more than, say, four times the magnitude of the link; your structure has a size of 5 links on a 32-bit machine. Structures must represent values; this does not seem to make any difference. Structures must be unchanged; it is a push full of volatility.
At what point, if I continued to add string properties, would there be time to convert the structure to a class?
The point of conversion of this structure to a class was the moment you created it. Firstly, it was never a structure. Your default assumption should be that the classes are good enough; just move on to the structure when you have evidence that this solves the problem that you have.
I planned to pass this structure around a GDI-oriented application. I have always believed that structures are more efficient when working with basic value types.
Structures are more efficient than classes in a very small number of cases: when they are small, immutable, represent values ββand consist of other values, such as integers. In other cases, they are less efficient: since structures are copied by value, large structures can be much slower to use than links. Since structures are copied by value, volatile structures lead to errors because you mutate copies when you consider yourself mutating variables. Because structures are copied by value, they should have value semantics, not references. And since structures containing only other structures can be completely skipped by the garbage collector, structures are only more efficient for cleaning purposes when they do not contain references.
In any case, as you say, if something is more efficient, try to do it both ways and measure its performance compared to your performance goals. Use science . Set a goal and measure it. The use of structures, "since I assume they are more efficient," makes rumor-based technical decisions. Measure and then you find out which is more efficient.
source share