my appliation crashes for some reason when i run this code, it just shuts down and tabs out of VS. For me everything seems correct but i am very new with C# and VS. It works properly when starting without debugging (CTRL + F5). Everything in the code seems correct to me, and i have no warnings within the code either.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace phoneSpace{
class PhoneNumber{
private string Number;
public string number{
get; set;
}
public PhoneNumber(string number){
Number = number;
}
public void printNumber(){
Console.WriteLine("{0}", Number);
}
static void Main(string[] args)
{
PhoneNumber phoneOne = new PhoneNumber("0703502341");
phoneOne.printNumber();
}
}
}