I'm having a little trouble with this code im writing for a simple program. I get tons of errors saying "invalid token" The program basically asks for 2 integers and sums them up, but the program needs to be called in another method.
Thanks in advance :D
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace AustinPDangeloJPA03 { class Add { static void Main(string[] args) { double num1, num2, sum; Console.Write("Enter the First integer: "); num1 = int.Parse(Console.ReadLine()); //First Integer entered and storred Console.Write("Enter the Second integer: "); num2 = int.Parse(Console.ReadLine()); //Second Integer entered and storred sum = Display(double a, double b); //First and second numbers added together Console.WriteLine(" {0} + {1} = {2} ",num1,num2,sum); //displays the sum //Instructs the user to press the Enter key to end the program Console.WriteLine("Press the Enter key to terminate the program..."); Console.ReadLine(); }//Closes Main Method static enum Display(a,b) { double c = a + b; return c; }//closes display method }//Closes Class Add }