I have some variables like
public static IGPOPort LED1; // Third 595 Chip control LEDS public static IGPOPort LED2; public static IGPOPort LED3; public static IGPOPort LED4; public static IGPOPort LED5; public static IGPOPort LED6; public static IGPOPort LED7; public static IGPOPort LED8;
I want to create a method like the follwing..
SwitchLED(int LEDNo,bool On)
{
(LED + LEDNo).Write(On); //i know this doesn't work but hopping this will explain what i am trying to achieve
}
Any other suggestion or variation on solution would be great?