DEV Community

Donny Yang
Donny Yang

Posted on

C# Debug

Looking for some help here. I recently started doing a new project through visual studio 2022 (C#) with the intention of creating a personal pokedex. I'm hardcoding all the pokemon info instead of using an external API because well...I don't know how to yet, and I just started this developer program through school last semester so everything is new to me. This is what the issue looks like:

Image description

Any help or suggestions would be appreciated. Thanks!

Top comments (1)

Collapse
 
ant_f_dev profile image
Anthony Fung

Hi Donny.

It looks like something's going wrong with Pokedex.Pokemon.Evolution and something being null. It looks like you're creating an anonymous object for Evolution, i.e.

Evolution = { "Mega..." }
Enter fullscreen mode Exit fullscreen mode

Should it be a List like Weaknessess? e.g.

Evolution = new List<string> { "Mega..." }
Enter fullscreen mode Exit fullscreen mode