public string buildClue() { string songYear = this.songForQuiestion.Year.ToString(); Song songForClue = null; this.Clue = "In this year <artist_name> also released the song <song_name> "; //Build Clue by Artist skill List <string>[] answer = null; answer = db.SelectUserSkills(this.User_email, "user_artists_skills", true); foreach (string artist in answer[0]) { //string artist = (string)o_artist; songForClue = db.GetRandomSongByArtistIDAndYear(artist, songYear); if (songForClue != null) { this.Clue = this.Clue.Replace("<artist_name>", songForClue.Artist_name); this.Clue = this.Clue.Replace("<song_name>", songForClue.Song_name); return(this.Clue); } } //If there is no artist with positive rate that released song at this year, build another default clue. clue = "The song is from the album <album_name>"; this.Clue = clue.Replace("<album_name>", this.songForQuiestion.Album_name); return(this.Clue); }