I updated your code a bit to make it run.
using System;
namespace ConsoleApplication20
{
class Program
{
static void Main(string[] args)
{
foreach (string str in args)
{
GetAllTasks(str);
}
}
public static void GetAllTasks(string str)
{
switch (str)
{
case "/Add":
Addition.Add();
break;
case "/Mul":
Multiplication.Mul();
break;
case "/Sub":
Subtraction.Sub();
break;
}
}
}
public class Addition
{
public static void Add()
{
int a = 10;
int b = 10;
int c = a + b;
Console.WriteLine(c);
}
}
public class Multiplication
{
public static void Mul()
{
int a = 10;
int b = 10;
int c = a * b;
Console.WriteLine(c);
}
}
public class Subtraction
{
public static void Sub()
{
int a = 10;
int b = 10;
int c = a - b;
Console.WriteLine(c);
}
}
}
Usage:
C:\>ConsoleApplication20.exe /Add /Mul /Sub
20
100
0
C:\>
There is always a point of beginning......
Hope it helps.
:)