I'm starting out with coding and trying to make a very basic calculator. I want to run it in a cmd by calling it up with two numbers. So, in the correct directory, I would type "BasicCal 2 + 5" to run it.
This is the code in C#
using System;
public class BasicCal
{
public static void Main(string [] args)
{
Console.Write(args[0] + args[1] + args[2]);
Console.ReadKey();
}
}
Cmd then just prints "2+5" so I guess C# doesn't see an operator as an argument.
So I just need to know how to make C# recognize an operator when it's given as a parameter. Thanks in advance.