StrataFrame Forum

Can I Convert list = new List from Net 4.0 to Net 2.0 ?

http://forum.strataframe.net/Topic33395.aspx

By Dong Trien Lam - 9/28/2016

I want to convert the code List<TestGridImage> list = new List<TestGridImage>() below from Net4.0 to .Net 2.0. Can you help me ?

namespace ExampleConvertList
{
   public partial class Form1 : Form
   {
      private List<TestGridImage> list;

      public Form1()
      {
         InitializeComponent();

         // I want to convert code have got List...
                        list = new List<TestGridImage>()
                       {
                             new TestGridImage() { KeyIndex = 0, KeyIndexAlt = 2 },
                             new TestGridImage() { KeyIndex = 1, KeyIndexAlt = 0 },
                             new TestGridImage() { KeyIndex = 2, KeyIndexAlt = 1 }
                       };
                       this.gridControl1.DataSource = list;
            
      }
   }



   public class TestGridImage
   {
        private int keyIndex;

        private int keyIndexAlt;

      public int KeyIndex
      {
         get { return keyIndex; }
         set { keyIndex = value; }
      }

        public int KeyIndexAlt
        {
            get { return keyIndexAlt; }
            set { keyIndexAlt = value; }
        }
   }
}