I am new in this all,and I have problem with adding data to list.
For example I declare it like :
List<ColorL> Color = new List<ColorL>();
Whero ColorL is
public class ColorL
{
public int Color_No { get; set; }
public string Color_Name { get; set; }
}
Now I try:
Color[i].Color_No = Convert.ToInt32(txtColorCode.Text);
Where i is some number.
Now i get NullReferenceException for this problem.
I think that this wold work for reading data, but I am not sure how to make insert.
Thanks