Collections interoperability : ICollection : Data Structure C# Examples


C# Examples » Data Structure » ICollection »

 

Collections interoperability









    
using  System;
using  System.Collections;
using  System.Collections.Generic;
using  System.Collections.ObjectModel;
using  System.Text;

public  class  MainClass
{
        public  static  void  Main()
        {
                int[]  arrayOfInts  =  new  int[]  {  10,  99,  50  };
                Array  a  =  (Array)arrayOfInts;
                IList  list  =  (IList)arrayOfInts;
                ICollection  collection  =  (ICollection)arrayOfInts;
                IEnumerable  enumerable  =  (IEnumerable)arrayOfInts;
                ICollection<int>  collectionGeneric  =  (ICollection<int>)arrayOfInts;
                IEnumerable<int>  enumerableGeneric  =  (IEnumerable<int>)arrayOfInts;

        }
}
    
   
  
   




HTML code for linking to this page:

Follow Navioo On Twitter

C# Examples

 Navioo Data Structure
» ICollection