c# - What is the way for direct assignment? -
What is the method of adding items to the list when I have a class setup
class person {String name; & Lt; RecipeList & gt; RCP = new list & amp; Lt; Reaction list & gt; (); Public listing & lt; RecipeList & gt; RList {get {return rcp; } Set {rcp = value; }} The public string name {get {return name;} set {name = value}}}} square RecipeList {string nameofrec; Get the public string NameofRecipe {return {return nameofrec; } Set {nameofrec = value; }}}}
not working with the following declaration
person [] PRN = new person [] {new person {Name = "Robert", RList = New list & lt; RecipeList & gt; () AddRange ("Coak", "Pizza")}, New Person {Name = "Rahim", RList = New List. & Lt; RecipeList & gt; () AddRange ("Coak", "OnionBread")}};
RList
is not a list of code> string after
Comments
Post a Comment