本文整理汇总了C#中CardColor类的典型用法代码示例。如果您正苦于以下问题:C#CardColor类的具体用法?C#CardColor怎么用?C#CardColor使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:Card
publicCard(CardColorcolor,Shapeshape,Fillfill,intcount)
{
#regionvalidation
if(color==CardColor.Other)
{
thrownewInvalidCardException("color",color);
}
if(shape==Shape.Other)
{
thrownewInvalidCardException("shape",shape);
}
if(fill==Fill.Other)
{
thrownewInvalidCardException("fill",fill);
}
if(count>3||count<1)
{
thrownewInvalidCardException("count",count);
}
#endregionvalidation
this.Color=color;
this.Shape=shape;
this.Fill=fill;
this.Count=count;
}
原文链接:
http://www.jxszl.com/biancheng/C/556676.html