本文整理汇总了C#中Series.Count方法的典型用法代码示例。如果您正苦于以下问题:C# Series.Count方法的具体用法?C# Series.Count怎么用?C# Series.Count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Series
的用法示例。
在下文中一共展示了Series.Count方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CheckSourceSeries
// Clears a violation if the series that is being checked has a missing value for the previous and current time-step
private static Series CheckSourceSeries(Series sourceS, Series checkS)
{
Series rval = checkS.Clone();
for (int i = 1; i < checkS.Count(); i++)
{
DateTime tprev = checkS[i - 1].DateTime;
DateTime t = checkS[i].DateTime;
if (checkS[t].Value < 0.0)
{
double checkVal1 = 0.0;
double checkVal2 = 0.0;
try
{
checkVal1 = sourceS[tprev].Value;
checkVal2 = sourceS[t].Value;
}
catch
{
checkVal1 = -99.0;
checkVal2 = -99.0;
}
if (checkVal1 < 0.0 || checkVal2 < 0.0)
rval.Add(t, 0.0);
else
rval.Add(checkS[t]);
}
else
{
rval.Add(checkS[t]);
}
}
return rval;
}