i




 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I Convert list = new List<...> from Net 4.0 to Net 2.0 ?
09-29-2016, 01:23 AM
Post: #1
Can I Convert list = new List<...> from Net 4.0 to Net 2.0 ?
I want to convert the code List list = new List() below from Net4.0 to .Net 2.0. Can you help me ?

Code:
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; }
        }
    }
}



Quote


Possibly Related Threads...
Thread: Author Replies Views: Last Post
  Getting COM port list ? dongtrien 0 241 03-22-2017 02:39 AM
Last Post: dongtrien
  Convert Dictionary Net 4.0 to Net 2.0 ? dongtrien 0 484 01-22-2017 06:52 AM
Last Post: dongtrien
  Convert code .Net4.0 to code .Net 2.0 dongtrien 0 877 04-21-2016 03:16 AM
Last Post: dongtrien
  Filter list items using linq c# nisar87 0 4,797 12-23-2012 05:23 PM
Last Post: nisar87
  Get distinct items form List<string> using Linq c# nisar87 0 2,434 12-23-2012 05:10 PM
Last Post: nisar87



User(s) browsing this thread: 1 Guest(s)