Taking the following sample:

I want to add a property to PreferenceOption called DataType because different instances of PreferenceOption could be bool or string etc.
Is there a way to do this? If yes, how?
I was thinking something like public ValueType DataType { get; set; }, but when creating instances of PreferenceOption like:
PreferenceOption WantsHouse = new PreferenceOption () { PreferenceOption = "Want House?", Weighting = Weighting.Low, Type = bool };
This doesn’t work, but should give a good idea of what I want to do.
Any suggestions?
EDIT (ANSWER): using the selected answer below, here’s what I’m now using (apologies for blurry image!):
public enum Weighting { One, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten }
public class TenantPropertyPreferenceOption<T>
{
public T PreferenceOption { get; set; }
public Weighting Weighting { get; set; }
}
public class TenantPropertyPreferenceOptions
{
TenantPropertyPreferenceOption<bool> WantsHouse = new TenantPropertyPreferenceOption<bool> () { PreferenceOption = false, Weighting = Weighting.One };
// ...
}
Use a generic class;