+ 1
Why variables should not be initialized in a structure in c#?
2 Réponses
+ 3
Which language referred? mark your question with proper tag
+ 1
I don't know if this is the right answer for you, but in the past, when I use structures, their members can be initialized as necessary, for example, structures that contains variable length of data, they usually comes with a member wherein we can assign a value that describes the amount of data is allocated for the variable length member buffer, so any function that works with the structure "knows" how much data can be written in it, to prevent buffer overflow (insufficient buffer).
Maybe you can link your code/snippet here, to show what you mean, so to have a clear view on the matter. More people will likely to help if it's clearly defined :)
Hth, cmiiw