【发布时间】:2016-09-12 19:42:33
【问题描述】:
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();
}
}
我错了Program does not contain a static 'Main' method suitable for an entry point。
Program.cs 属性具有编译操作。
我不知道出了什么问题。
【问题讨论】:
标签: c#-4.0 generic-list