C# ASP.NET MVC Basics Modeling and Presenting Data Creating a Data Model

krishna kanth allu
krishna kanth allu
624 Points

I cant able to find the error

I think I had concatenated the string correctly but it shows error.

VideoGame.cs
namespace Treehouse.Models
{

    public class VideoGame
    {
        public int Id{get;set;}
        public string Title{get;set;}
        public string Description{get;set;}
        public string[] Characters{get;set;}
        public string Publisher{get;set;}

        public string DisplayText
        {
            get
            {
                return   Title  + "(" + Publisher + ")"  ;
            }
        }
    }
}

2 Answers

Jennifer Nordell
MOD
Jennifer Nordell
Treehouse Moderator

Hi there! You're doing terrific! Sincerely. You're one space off. Right now what's being returned (using their example and your code) would be "Super Mario 64(Nintendo)". But what they want is for it to return "Super Mario 64 (Nintendo)". Note the space between the 64 (which is the end of the publisher) and the open parenthesis. I'll leave the placement up to you, but let me know if you're still stuck!

Good luck! :sparkles: