c# - How do I ignore a field size in a struct using Marshal.SizeOf? -
Is there a way to ignore a field in the calculation of a straight ruler using martial
Ex:
public communication messages {public use x; Public Youth Wai; // Ignore this field in calculation} int size = Marshal.SizeOf (typef (message));
Now the size is 4. I want to be the size 2. Is there any way to do this?
The only way I can think of doing this and return to 0 if you can apply . You will use to apply Custom Marshler in that area. But, it will not be properly martial, so I do not know why you want to do this.
Comments
Post a Comment