This was quite a hard challenge

just a minor bit of feedback on this: i’m not sure I have done enough in this course with dictionaries, and in particular, retrieving values from them, to have a decent shot at this challenge. I hunted around ended up mired in .TryGetValue and got lost. The ‘very simple’ solution was kinda elusive.
Maybe a point for an eventual re-record. Or maybe I’m just thick :smiley:

It’s ok, some of the challenges are a bit more -ahem- challenging then others. This one was tough even for me when I took the course (before I became the RPG whisperer). The important bit is your understanding what’s going on after the challenge answer is revealed (unless, of course, you have a better challenge answer) :slight_smile:

1 Like

Thanks Brian!
I think what caught me out was my mind went to trying to access a dictionary as it if were a ‘nested array’. So I was thinking [class[stat[level]]]. In fact it’s much easier than that, which is good to know. It’s more like accessing a datatable in R (though I imagine C# pre-dates R by some decades) [Row][Column]

Actually, R has been around since 1993. C# was developed in 2000. C++, on the other hand, has been around since 79 (though it didn’t get it’s name till 83), and the C language from which C++ inherits has been around since 72.
I’m fond of saying that C# is the byproduct of an illicit affair between C++ and Java.

3 Likes

Privacy & Terms