using System;
using System.Collections.Generic;
namespace ConsoleApplication74
{
class Program<T>
{
public void Add(T X)
{
Console.WriteLine("{0}", X);
}
static void Main(string[] args)
{
Program<string> MyGeneric = new Program<string>();
MyGeneric.Add("ABC");
Console.Read();
}
}
У меня есть erroe Program does not contain a static 'Main' method suitable for an entry point
. В свойствах Program.cs есть Build Action as Compile. Я понятия не имею, что не так.Общий список и статические основные
Возможный дубликат [Почему я не могу использовать в качестве точки входа в C# приложение универсального типа?] (HTTP: // StackOverflow .com/questions/28045923/why-i-can-use-as-entry-point-in-c-sharp-app-a-generic-type) – hatchet