Suppose I declare a class TTest
Then declare and create 2 objects: test1 and test2
test1, test2: TTest;
procedure TForm1.Button1Click(Sender: TObject);
Then later I want to compare the values of the parameters of each class to see if they match. I dont want to have to compare each parameter like this:
if (test1.fred=test2.fred) AND (test1.chris=test2.chris) then...
This gets very messy if the object has 10 or more parameters to compare.
Ideally I would like to do something like
if test1 = test2 then...
but this doesn't work!