I have a TcpListener Listening on a NetworkStream to perform a command examples. "Copy, Move, Delete, ...."
switch(command)
{
case "copy":
// do copy
break;
case "delete":
// do delete
break;
case "move":
// do move
break;
.......................................
}
i have implemented it using switch - case and if statement but when it comes to maintenance or adding a new command, specially when the commands list goes beyond 100 commands it becomes very hard and tedious, so is there a way to do this efficiently, i have tried searching on Google but i can't seem to get the jargon of it correctly
Any help :) Yaser
if else