using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication3Generics
{
class Program
{
static void Main(string[] args)
{
ScheduleSelectedItems sitems = new ScheduleSelectedItems("Yusuf");
ScheduleSelectedItemsList slist = new ScheduleSelectedItemsList();
slist.Items.Add(sitems);
Console.Write(slist.Items[0].ToString());
Console.ReadKey();
}
}
public class ScheduleSelectedItems
{
private string Ad;
public ScheduleSelectedItems(string ad)
{
Ad = ad;
}
}
public class ScheduleSelectedItemsList
{
public List Items;
public ScheduleSelectedItemsList()
{
Items = new List();
}
}
}
我该如何在我的控制台上添加“Yusuf”?