Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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

chris muhirwa
chris muhirwa
1,112 Points

cant figure out what am doing wrong

cant figure out where am wrong in my answer

VideoGame.cs
namespace Treehouse.Models
{

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

2 Answers

In the line public Character[]Characters { get; set; }, there should be a space between the [] and Characters. It should also be string[] rather than Character[].

The challenge wants you to create a VideoGame class with all of those properties. You haven't declared the class in your code.

Allan P
Allan P
41 Points

public Character[]Characters { get; set; } should be public string[] Characters {get; set;]