当前位置: 首页>>代码示例>>C#>>正文


C# Int32.Count方法代码示例

本文整理汇总了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);
        }
开发者ID:yunakh,项目名称:todo,代码行数:14,代码来源:HomeController.cs

示例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();
            }
        }
开发者ID:Jamedjo,项目名称:rocksmith-custom-song-toolkit,代码行数:52,代码来源:SngFile.cs

示例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;
        }
开发者ID:yunakh,项目名称:todo,代码行数:18,代码来源:TodoService.cs

示例4: CountReturnsZeroWhenSourceIsEmptyAndPredicateIsUsed

 public void CountReturnsZeroWhenSourceIsEmptyAndPredicateIsUsed()
 {
     var source = new Int32[0];
     Assert.That(source.Count(i => i == 0), Is.EqualTo(0));
 }
开发者ID:kawillia,项目名称:LinqToObjects,代码行数:5,代码来源:CountTests.cs

示例5: CountReturnsZeroWhenSourceIsEmpty

 public void CountReturnsZeroWhenSourceIsEmpty()
 {
     var source = new Int32[0];
     Assert.That(source.Count(), Is.EqualTo(0));
 }
开发者ID:kawillia,项目名称:LinqToObjects,代码行数:5,代码来源:CountTests.cs


注:本文中的System.Int32.Count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。