I was working with some examples about "Constructors" and I made this example on Visual Studio:
using System;
using System.Reflection.Metadata.Ecma335;
namespace Classes
{
class Program
{
static void Main(string[] args)
{
var customer = new Customer(1, "John");
Console.WriteLine(customer.Id);
Console.WriteLine(customer.Name);
}
}
public class Customer
{
public int Id;
public string Name;
public Customer()
{
}
public Customer(int id)
{
this.Id = id;
}
public Customer(int id, string name)
{
this.Id = id;
this.Name = name;
}
}
}
But when I try to run the code, I get this message:
The "GetPackageDirectory" task failed unexpectedly.
So what is going wrong here? Why am I facing this issue?
I would really appreciate any idea or suggestion from you guys.
Thanks in advance.
question from:
https://stackoverflow.com/questions/65863792/get-package-directory-task-failed-unexpectedly 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…