本文整理汇总了C#中System.Int32.Count方法的典型用法代码示例。如果您正苦于以下问题:C# Int32.Count方法的具体用法?C# Int32.Count怎么用?C# Int32.Count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Int32
的用法示例。
在下文中一共展示了Int32.Count方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteTask
public JsonResult DeleteTask(Int32[] idList)
{
DeleteTaskJsonModel deleteTaskJsonModel = new DeleteTaskJsonModel
{
StatusJson = false
};
if (idList != null && idList.Count() != 0)
{
deleteTaskJsonModel.StatusJson = _todoService.DeleteTask(idList);
}
return Json(deleteTaskJsonModel);
}
示例2: SongLevel
public SongLevel(BinaryReader br, int version)
{
Difficulty = br.ReadInt32();
AnchorCount = br.ReadInt32();
Anchors = new Anchor[AnchorCount];
for (int i = 0; i < AnchorCount; ++i)
{
Anchors[i] = new Anchor(br);
}
SlideCount = br.ReadInt32();
Slides = new Slide[SlideCount];
for (int i = 0; i < SlideCount; ++i)
{
Slides[i] = new Slide(br);
}
HandShapeCount = br.ReadInt32();
HandShapes = new HandShape[HandShapeCount];
for (int i = 0; i < HandShapeCount; ++i)
{
HandShapes[i] = new HandShape(br);
}
NoteCount = br.ReadInt32();
Notes = new Note[NoteCount];
for (int i = 0; i < NoteCount; ++i)
{
Notes[i] = new Note(br, version);
}
PhraseCount = br.ReadInt32();
AverageNotesPerPhrase = new float[PhraseCount];
for (int i = 0; i < PhraseCount; ++i)
{
AverageNotesPerPhrase[i] = br.ReadSingle();
}
PhraseIterationCount = br.ReadInt32();
NotesPerIteration1 = new Int32[PhraseIterationCount];
for (int i = 0; i < NotesPerIteration1.Count(); ++i)
{
NotesPerIteration1[i] = br.ReadInt32();
}
PhraseIterationCount = br.ReadInt32();
NotesPerIteration2 = new Int32[PhraseIterationCount];
for (int i = 0; i < NotesPerIteration2.Count(); ++i)
{
NotesPerIteration2[i] = br.ReadInt32();
}
}
示例3: DeleteTask
public Boolean DeleteTask(Int32[] taskId)
{
if (taskId != null && taskId.Count() != 0)
{
IQueryable<Task> tasks = _taskRepository.GetList().Where(x => taskId.Any(a => a == x.TaskId));
foreach (Task task in tasks)
{
_taskRepository.Remove(task);
}
_taskRepository.Save();
return true;
}
return false;
}
示例4: CountReturnsZeroWhenSourceIsEmptyAndPredicateIsUsed
public void CountReturnsZeroWhenSourceIsEmptyAndPredicateIsUsed()
{
var source = new Int32[0];
Assert.That(source.Count(i => i == 0), Is.EqualTo(0));
}
示例5: CountReturnsZeroWhenSourceIsEmpty
public void CountReturnsZeroWhenSourceIsEmpty()
{
var source = new Int32[0];
Assert.That(source.Count(), Is.EqualTo(0));
}