I have a C# Windows Form project. When i place a control, for example a label, it will have all the default properties. If I change one of these properties, for example, changing BorderStyle from "None" to "FixedSingle", the "FixedSingle" will be bold because it is changed from the default. Therefore, I know visual studio can recognize when a property is changed from the default. My question is, can I find all of these changed properties for all controls in a form, and output them?
Here is an example of pseudo code that it may look like:
foreach (Control ctrl in this.Controls)
{
foreach (var property in ctrl)
{
if (property.Value != property.DefaultValue)
{
Console.WriteLine(property + ":" + property.Value)
}
}
}