Nettiers.AdventureWorks.Entities.EntityUtil.ChangeType C# (CSharp) Method

ChangeType() public static method

Converts the specified value to the specified type.
public static ChangeType ( Object value, Type conversionType ) : Object
value Object The value to convert.
conversionType System.Type A System.Type to convert to.
return Object
		public static Object ChangeType(Object value, Type conversionType)
		{
			return ChangeType(value, conversionType, true);
		}

Same methods

EntityUtil::ChangeType ( Object value, Type conversionType, bool convertBlankToNull ) : Object

Usage Example

        /// <summary>
        /// Reads values from the supplied <see cref="IDictionary"/> object into
        /// properties of the current object.
        /// </summary>
        /// <param name="values">An <see cref="IDictionary"/> instance that contains
        /// the key/value pairs to be used as property values.</param>
        public override void Load(IDictionary values)
        {
            #region Init Properties

            if (values != null)
            {
                TimestampPk = (values["TimestampPk"] != null) ? (System.Byte[])EntityUtil.ChangeType(values["TimestampPk"], typeof(System.Byte[])) : new byte[] {};
            }

            #endregion
        }
All Usage Examples Of Nettiers.AdventureWorks.Entities.EntityUtil::ChangeType