當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。