public PlayerAchievement(Hashtable data) { foreach(string x in data.Keys) { if (x == "player") { player = new PlayerAward ((Hashtable)data["player"]); continue; } if( x == "friends") { var frarr = (ArrayList)data [x]; var fawards = new List<PlayerAward> (); fawards.AddRange(from object t in frarr select new PlayerAward((Hashtable) t)); friends = fawards; continue; } this[x] = data[x]; } }
public PlayerAchievement(Hashtable data) { foreach (string x in data.Keys) { if (x == "player") { player = new PlayerAward((Hashtable)data["player"]); continue; } if (x == "friends") { var frarr = (ArrayList)data [x]; var fawards = new List <PlayerAward> (); fawards.AddRange(from object t in frarr select new PlayerAward((Hashtable)t)); friends = fawards; continue; } this[x] = data[x]; } }