本文整理汇总了C#中AType类的典型用法代码示例。如果您正苦于以下问题:C#AType类的具体用法?C#AType怎么用?C#AType使用的例子?这里精选的类代码示例或许可以为您提供帮助。
示例1:PrepareExpandVector
privatebyte[]PrepareExpandVector(ATypeleft)
{
//iftheleftsideisUserdefinedfunction,wethrowValenceerror.
//thispartbelongstoScan.
if(left.Type==ATypes.AFunc)
{
thrownewError.Valence(ValenceErrorText);
}
if(!(left.Type==ATypes.AFloat||left.Type==ATypes.AInteger||left.Type==ATypes.ANull))
{
thrownewError.Type(TypeErrorText);
}
if(left.Rank>1)
{
thrownewError.Rank(RankErrorText);
}
//intelement;
ATypescalar;
byte[]expandVector;
if(left.TryFirstScalar(outscalar,true))
{
expandVector=newbyte[]{ExtractExpandArgument(scalar)};
}
else
{
expandVector=left.Select(item=>ExtractExpandArgument(item)).ToArray();
}
returnexpandVector;
}
原文链接:
http://www.jxszl.com/biancheng/C/556584.html