Hi there,
first of all, thanks for the great example and the code.
I just wanted to point a minor error that causes an exception to be thrown if there is a key that has a null as value assigned to it. you have to correct the PropertyType property to read:
public override Type PropertyType
{
get
{
if (_dictionary[_key] != null)
{
return _dictionary[_key].GetType();
}
else
{
return typeof(object);
}
}
}
Small error in Code
public override Type PropertyType { get { if (_dictionary[_key] != null) { return _dictionary[_key].GetType(); } else { return typeof(object); } } }Cheers, Tobi