How to do it: Manipulating reflected properties

How to do it
Table of Contents
Operations
Populate reflected property with default value

If the reflected property is a value type then it will be set to the default value otherwise in case of a reference type, it will be set it to null.

How to do it
prop.SetValue(obj,null,null)
Obtain the default value of the type of the reflected property
How to do it
PropertyDescriptor prop = TypeDescriptor.GetProperties(obj)["propertyName1"];
if (prop.CanResetValue(lvObject)) prop.ResetValue(obj);
Obtain the default value of the type of the reflected property (custom function)
How to do it
    public static T GetDefault<T>()
    {
        return (T) GetDefault(typeof(T));
    }
    public static object GetDefault(Type type)
    {
        // If no Type was supplied, if the Type was a reference type, or if the Type was a System.Void, return null
        if (type == null || !type.IsValueType || type == typeof(void))
            return null;

        // If the supplied Type has generic parameters, its default value cannot be determined
        if (type.ContainsGenericParameters)
            throw new ArgumentException(
                "{" + MethodInfo.GetCurrentMethod() + "} Error:\n\nThe supplied value type <" + type +
                "> contains generic parameters, so the default value cannot be retrieved");

        // If the Type is a primitive type, or if it is another publicly-visible value type (i.e. struct), return a
        //  default instance of the value type
        if (type.IsPrimitive || !type.IsNotPublic)
        {
            try
            {
                return Activator.CreateInstance(type);
            }
            catch (Exception e)
            {
                throw new ArgumentException(
                    "{" + MethodInfo.GetCurrentMethod() + "} Error:\n\nThe Activator.CreateInstance method could not " +
                    "create a default instance of the supplied value type <" + type +
                    "> (Inner Exception message: \"" + e.Message + "\")", e);
            }
        }

        // Fail with exception
        throw new ArgumentException("{" + MethodInfo.GetCurrentMethod() + "} Error:\n\nThe supplied value type <" + type +
            "> is not a publicly-visible type, so the default value cannot be retrieved");
    }