Structure Comparison

Hi Guys,

Simple question: Can I compare (=) two properties of the same type of structure?

My hope was that I could collect the initial form field values in a structure at form open (InitFormValues) and then compare that structure to another structure (CurrentFormValues) of the same type.

Each structure is a property on my (form-related) class.

If you have fields of variable sizes, better create a class with those fields and a “comparer method” there that takes another instance of such class to compare. If you want to save and load all those values at once from a external media, also create some kind of serialization/deserialization as ToString() and a FromString() methods (or ToJSON(), FromJSON(), etc).

2 Likes