samedi 17 septembre 2016

LIST

How can i insert item at specific position when i pass list to this function .

   public void myFunction <T> ( List<T> myLIST )
      {
        var ID =      typeof( T ).GetProperties() [ 0 ].GetValue( myLIST  , null ) ;
        var Name =    typeof( T ).GetProperties() [ 1 ].GetValue( myLIST  , null ) ;

        ID = "15";
        Name = "Jone";

        // How to insert at postion 5 new data 
        myLIST.Insert( 5 , ????? );  

    }





Aucun commentaire:

Enregistrer un commentaire