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")}};  

itemprop = "text">

RList is not a list of code> string after

Comments

Popular posts from this blog

MySql variables and php -

url rewriting - How to implement the returnurl like SO in PHP? -

Which Python client library should I use for CouchdB? -