Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

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;]