We have resolved it with a workaround .
Used a list like 'List<SSHClient> clients' and added as many as NumOfSSHObjects.
NumOfSSHObjects = NumOfCommands / 10;
if ( (NumOfCommands % 10 ) > 0)
{
for (int i = 1; i <= NumOfSSHObjects ; i++)
Used a list like 'List<SSHClient> clients' and added as many as NumOfSSHObjects.
NumOfSSHObjects = NumOfCommands / 10;
if ( (NumOfCommands % 10 ) > 0)
{
NumOfSSHObjects = NumOfSSHObjects +1 ;
}for (int i = 1; i <= NumOfSSHObjects ; i++)
{
clients.Add(new SshClient(connectionInfo));
}