I have created a class called TpSensor and have a constructor used to set passed properties for each New sensor created (Sensors.Append(New TpSensor(“Storage Area”,2,“PWA2”,“LowTemp”))). I am curious why this works:
I’ll sometimes name them with the additional word “input” if I can’t come up with anything clever. Method MyMethod(Input_Sensor_Name as String, Input_Sensor_Number as Integer)
The complier cannot be sure which ‘Sensor_Name’ you are referring to (on either side of the equation), so as a default it always uses the most local instance of the identifier, which in this case, is a variable.