bixel
August 28th, 2008, 12:29 AM
1st I created a struct (class)
namespace RolePlayingGameData
{
/// </summary>
[Serializable]
public struct SpellList
{
//Main guts
[ContentSerializer(Optional = true)]
public bool MySpell1;
[ContentSerializer(Optional = true)]
public bool MySpell2;
}
}
there is actually a whole bunch more there but I left it out for space reasons
all of those booleans get written to a xml file, with a true or false setting. But I've drank too much coffee and I forgot how to properly use the for each arguement
how do I return a updated SpellList with only the Spells marked true in the list??
namespace RolePlayingGameData
{
/// </summary>
[Serializable]
public struct SpellList
{
//Main guts
[ContentSerializer(Optional = true)]
public bool MySpell1;
[ContentSerializer(Optional = true)]
public bool MySpell2;
}
}
there is actually a whole bunch more there but I left it out for space reasons
all of those booleans get written to a xml file, with a true or false setting. But I've drank too much coffee and I forgot how to properly use the for each arguement
how do I return a updated SpellList with only the Spells marked true in the list??