Hi,
Now that I have a better grasp of Classes and their importance in C#, I have a question about how to handle a certain situation.
I have to perform 5-6 tests using 3 different external devices that all require about 10 or so commands to be setup at the begining of each test.
So there are approx 10 commands for each device for 6 tests.
I was originally going to but these into an array for each device but now it makes more sense to have a method in the Class for each deveice for each step - device1_test1() device2_test2() etc.
This is fine but I need to give the user the ability to go back to a previous step incase of an error.
So if the error occurs at TEST4, the user can go back to TEST2, but I obviously need to reissue the commands so that I am sure where we are since the commands depend on each other as they progress thru the tests.
So I would issues test1 commands for all devices then test2 commands for all devices and so on.
Is this how I should be doing it ?
If so, when I invoke device1_test1 and 2 etc, can I do this by using the contents of a variable in the method name for the test1 test2 test3 part of it by incrementing an integer ?
I am not sure of the syntax even but something like this -
device1_test+counter+() where counter will contain 1, then 2, then 3 etc ?
Hope this makes sense.
Otherwise, any suggestions on how to better tackle this scenario ?
Thanks, George.