110,534
社区成员
发帖
与我相关
我的任务
分享
class Wind
{
public string Color { get; set; }
public int Speed { get; set; }
static void Main(string[] args)
{
Wind northWind = new Wind{ Color = "Blue",Speed=10};
Wind southWind = new Wind{ Color = "Red", Speed = 5 };
Console.WriteLine("north wind's speed:{0}",northWind.Speed);
Console.ReadKey();
}
public interface IListSource
{
// 摘要:
// 获取表示集合是否是 System.Collections.IList 对象集合的值。
//
// 返回结果:
// 如果集合是 System.Collections.IList 对象集合,则为 true;否则,为 false。
bool ContainsListCollection { get; }
// 摘要:
// 从不实现 System.Collections.IList 本身的对象返回可以绑定到数据源的 System.Collections.IList。
//
// 返回结果:
// 对象中可以绑定到数据源的 System.Collections.IList。
IList GetList();
}
public abstract class Base
{
public abstract int Count
{
get;
}
public int Compute()
{
return Count;
}
}
public class Derived:Base
{
public override int Count
{
get {return 5;}
}
}