ChangeType() public method

public ChangeType ( object value, Type conversionType ) : object
value object
conversionType System.Type
return object
		public void InitializeField(MigrationContext context)
		{			
			FieldInfo field = context.CurrentField;
			SerializationInfo info = context.CurrentSerializationInfo;

			object value = info.GetValue(_fieldName, field.FieldType);
			field.SetValue(context.CurrentObject, context.ChangeType(value, field.FieldType));
			context.Trace("Field {0} set to \"{1}\" loaded from field {2}.", field.Name, value, _fieldName);
		}
		public void InitializeField(MigrationContext context)
		{			
			FieldInfo field = context.CurrentField;			
			field.SetValue(context.CurrentObject, context.ChangeType(_constValue, field.FieldType));
		}