What is the Count property of SortedList class in C#?

CsharpServer Side ProgrammingProgramming

Example

 Live Demo

using System;
using System.Collections;

namespace Demo {
   class Program {
      static void Main(string[] args) {
         SortedList s = new SortedList();

         s.Add("S1", "Electronics");
         s.Add("S2", "Clothing");
         s.Add("S3", "Applicances");
         s.Add("S4", "Books");
         s.Add("S5", "Accessories");
         s.Add("S6", "Musical Instruments");

         Console.WriteLine("Count = " + s.Count);
      }
   }
}

Output

Count = 6
raja
Published on 07-Aug-2018 08:36:45
Advertisements