I have a Type set up as follow
class Program
{
static void Main()
{
IEnumerable<int> one = new int[] { 1, 2, 3, 4, 5, 6, 7 };
IEnumerable<int> two = new int[] { 12, 34, 56, 7, 8 };
MySet[] sets
= new MySet[]
{
new MySet{ MySetID =100,
MySubSet=new MySubSet{SubSet=new List<int>().AddRange(one), SubSetID=1212}},
new MySet{ MySetID =101,
MySubSet=new MySubSet{SubSet=new List<int>().AddRange(two), SubSetID=1414}}
};
}
}
class MySet
{
int mySetID;
MySubSet subset = new MySubSet();
public int MySetID
{
get { return mySetID; }
set { mySetID = value; }
}
public MySubSet MySubSet
{
get { return subset; }
set { subset = value; }
}
}
class MySubSet
{
int subsetID;
List<int> subset = new List<int>();
public List<int> SubSet
{
get{ return subset; }
set {subset = value;}
}
public int SubSetID
{
get { return subsetID; }
set { subsetID = value; }
}
}
I am getting error
Cannot implicitly convert type 'void' to 'System.Collections.Generic.List<int>'
inside Main() declaration
MySubSet=new MySubSet{SubSet=new List<int>().AddRange(one)