本文整理匯總了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));
}