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

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -