After spending countless hours changing my code and removing everything that wont serialize and changing them to strings and writing functions to convert from Font/Color to strings and back again i've got fed up and decided to make my own basic serializer..
private void saveSettings()
{
PropertyInfo[] properties = typeof(settingsObj).GetProperties();
foreach (settingsObj s in settings)
{
foreach (PropertyInfo property in properties)
{
MessageBox.Show(s.[property.Name]);
}
}
}
How do i refer to a variable using a string, in PHP i'd do:
$varIWantToRead = "foobar";
$varName = "varIWantToRead";
print $$varName;