Now that I have a little more time:
This would be the C# translation of the PHP code:
string[] marco = new string[] {"tree", "topic1"};
string[] daniel = new string[];
However, if you want to be able to add to the list, you should use this:
List<string> marco = new List<string>(new string[] {"tree", "topic1"});
List<string> daniel = new List<string>();
Then you can add and to them like this:
daniel.Add("coconut");
In either case, you can access the elements like this:
string first = marco[0];
But if you just need to be able to track whether the user has covered a particular topic or not, I recommend not storing strings. All you need is one bit of information. So you could put it in an array of bits.
// Enums must be defined outside the scope of a function (but within a class)
enum marco_topics
{
tree,
topic1,
topic2,
topic3,
topic4
count
}
// Create new bit array with element count equal to enum value count, all defaulted to false
static System.Collections.BitArray marco = new System.Collections.BitArray(marco_topics.count, false);
// Remember that tree has been discussed
marco[marco_topics.tree] = true;
// Check if tree was discussed
if (marco[marco_topics.tree])
{
// trees are covered
}
I just remembered that SGDK 2.0 is based on .NET 1.1, and "generics" (like List<string>) are only available in .NET 2.0. But if you want to use a BitArray, it doesn't matter (if you don't I suggest using an ArrayList as demonstrated above).