78 references to ChangeType
mscorlib (8)
system\convert.cs (1)
322return ChangeType(value, conversionType, Thread.CurrentThread.CurrentCulture);
system\enum.cs (1)
402temp = Convert.ChangeType(value, underlyingType, CultureInfo.InvariantCulture);
system\runtime\interopservices\windowsruntime\clripropertyvalueimpl.cs (1)
431return (T)Convert.ChangeType(value, typeof(T), System.Globalization.CultureInfo.InvariantCulture);
system\runtime\remoting\message.cs (4)
605ret = Convert.ChangeType(value, pt, CultureInfo.InvariantCulture); 768ret = Convert.ChangeType(value, pt, CultureInfo.InvariantCulture); 775ret = Convert.ChangeType(value, pt, CultureInfo.InvariantCulture); //Should this just throw an exception 778ret = Convert.ChangeType(value, pt, CultureInfo.InvariantCulture);
system\runtime\serialization\formatterconverter.cs (1)
33return System.Convert.ChangeType(value, type, CultureInfo.InvariantCulture);
PresentationBuildTasks (2)
Framework\System\Windows\Markup\BamlRecords.cs (2)
2617uintValue += (uint)Convert.ChangeType(rawEnumValue, typeof(uint), TypeConverterHelper.InvariantEnglishUS); 2636bamlBinaryWriter.Write((byte)Convert.ChangeType(convertedValue, typeof(byte), TypeConverterHelper.InvariantEnglishUS));
PresentationFramework (4)
src\Framework\MS\Internal\Data\DefaultValueConverter.cs (2)
465return System.Convert.ChangeType(o, _targetType, culture); 473: System.Convert.ChangeType(o, _sourceType, culture);
src\Framework\System\Windows\Markup\BamlRecords.cs (2)
2617uintValue += (uint)Convert.ChangeType(rawEnumValue, typeof(uint), TypeConverterHelper.InvariantEnglishUS); 2636bamlBinaryWriter.Write((byte)Convert.ChangeType(convertedValue, typeof(byte), TypeConverterHelper.InvariantEnglishUS));
System (3)
compmod\system\componentmodel\basenumberconverter.cs (1)
132return Convert.ChangeType(value, destinationType, culture);
compmod\system\configuration\appsettingsreader.cs (1)
68return Convert.ChangeType(val, type, CultureInfo.InvariantCulture);
compmod\system\diagnostics\traceutils.cs (1)
128return Convert.ChangeType(value, type, CultureInfo.InvariantCulture);
System.ComponentModel.DataAnnotations (2)
DataAnnotations\CustomValidationAttribute.cs (1)
296convertedValue = Convert.ChangeType(value, t, CultureInfo.CurrentCulture);
DataAnnotations\EnumDataTypeAttribute.cs (1)
95return Convert.ChangeType(enumValue, Enum.GetUnderlyingType(enumType), CultureInfo.InvariantCulture).ToString();
System.Data (14)
fx\src\data\System\Data\Common\SQLConvert.cs (1)
610return Convert.ChangeType(value, type, formatProvider);
fx\src\data\System\Data\Filter\BinaryNode.cs (1)
805value = Convert.ChangeType(value, DataStorage.GetTypeStorage(resultType), FormatProvider);
fx\src\data\System\Data\Odbc\odbcmetadatafactory.cs (1)
247sqlType = (ODBC32.SQL_TYPE)(Int32) Convert.ChangeType(getTypeInfoValues[indexDATA_TYPE],
fx\src\data\System\Data\Odbc\OdbcParameter.cs (1)
872value = Convert.ChangeType (value, _typemap._type, (System.IFormatProvider)null);
fx\src\data\System\Data\OleDb\OleDbMetaDataFactory.cs (1)
404short nativeDataType = (short) Convert.ChangeType(sourceRow[sourceOleDbType],typeof(short), CultureInfo.InvariantCulture);
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
420value = Convert.ChangeType(value, destinationType.dataType, (IFormatProvider)null);
fx\src\data\System\Data\SqlClient\SqlParameter.cs (2)
940value = Convert.ChangeType(value, destinationType.ClassType, (IFormatProvider)null); 970value = Convert.ChangeType(value, destinationType.ClassType, (IFormatProvider)null);
fx\src\data\System\Data\XmlDataLoader.cs (2)
886hasErrors = (bool)Convert.ChangeType(dataReader.Value, typeof(bool), CultureInfo.InvariantCulture); 894rowOrder = (Int32)Convert.ChangeType(dataReader.Value, typeof(Int32), CultureInfo.InvariantCulture);
fx\src\data\System\Data\XMLDiffLoader.cs (1)
295pos = (Int32) Convert.ChangeType(value, typeof(Int32), null);
fx\src\data\System\Data\XMLSchema.cs (3)
1766int ordinal = (int)Convert.ChangeType(tmp, typeof(int), null); 1865int ordinal = (int)Convert.ChangeType(tmp, typeof(int), null); 2186int ordinal = (int)Convert.ChangeType(tmp, typeof(int), null);
System.Data.Entity (11)
System\Data\Common\CommandTrees\ExpressionBuilder\Internal\ArgumentValidation.cs (1)
2112Convert.ChangeType(Enum.Parse(clrEnumType, edmEnumTypeMember.Name), clrEnumType.GetEnumUnderlyingType(), CultureInfo.InvariantCulture)))
System\Data\Common\CommandTrees\Internal\ViewSimplifier.cs (1)
837value = Convert.ChangeType(value, primitiveType.ClrEquivalentType, CultureInfo.InvariantCulture);
System\Data\Mapping\Update\Internal\Propagator.Evaluator.cs (1)
553return Convert.ChangeType(value, clrPrimitiveType, formatProvider);
System\Data\Mapping\Update\Internal\UpdateCompiler.cs (2)
471principalValue = Convert.ChangeType(principalValue, principalType.GetEnumUnderlyingType(), CultureInfo.InvariantCulture); 478principalValue = Convert.ChangeType(principalValue, columnClrEquivalentType, CultureInfo.InvariantCulture);
System\Data\Mapping\Update\Internal\UpdateTranslator.cs (1)
561value = Convert.ChangeType(value, clrType, CultureInfo.InvariantCulture);
System\Data\Metadata\Converter.cs (1)
1063var enumMember = new EnumMember(somEnumMember.Name, Convert.ChangeType(somEnumMember.Value, clrEnumUnderlyingType, CultureInfo.InvariantCulture));
System\Data\Metadata\Edm\EnumType.cs (1)
105Convert.ChangeType(Enum.Parse(clrType, name), clrType.GetEnumUnderlyingType(), CultureInfo.InvariantCulture)));
System\Data\Metadata\ObjectLayer\ObjectItemConventionAssemblyLoader.cs (1)
303Convert.ChangeType(
System\Data\Objects\ELinq\Translator.cs (1)
146value = System.Convert.ChangeType(linq.Value, nonNullableLinqType.GetEnumUnderlyingType(), CultureInfo.InvariantCulture);
System\Data\Query\PlanCompiler\NominalTypeEliminator.cs (1)
1886Convert.ChangeType(op.Value, op.Value.GetType().GetEnumUnderlyingType(), CultureInfo.InvariantCulture) :
System.Data.Linq (11)
DbConvert.cs (7)
98return Enum.ToObject(toType, Convert.ChangeType(value, Enum.GetUnderlyingType(toType), Globalization.CultureInfo.InvariantCulture)); 106return Convert.ChangeType(Convert.ChangeType(value, 124return new TimeSpan((long)Convert.ChangeType(value, typeof(long), Globalization.CultureInfo.InvariantCulture)); 140return Convert.ChangeType(((TimeSpan)value).Ticks, toType, Globalization.CultureInfo.InvariantCulture); 177return Convert.ChangeType(value, toType, Globalization.CultureInfo.InvariantCulture); 187return Convert.ChangeType(value, toType, Globalization.CultureInfo.InvariantCulture);
SqlClient\SqlProvider.cs (2)
1160prec = (int)Convert.ChangeType(piPrecision.GetValue(p, null), typeof(int), CultureInfo.InvariantCulture); 1164scale = (int)Convert.ChangeType(piScale.GetValue(p, null), typeof(int), CultureInfo.InvariantCulture);
SqlClient\SqlTypeSystemProvider.cs (2)
992piPrecision.SetValue(parameter, Convert.ChangeType(sqlType.Precision, piPrecision.PropertyType, CultureInfo.InvariantCulture), null); 996piScale.SetValue(parameter, Convert.ChangeType(sqlType.Scale, piScale.PropertyType, CultureInfo.InvariantCulture), null);
System.Data.Services (1)
System\Data\Services\Serializers\JsonDeserializer.cs (1)
108return Convert.ChangeType(value, propertyType, CultureInfo.InvariantCulture);
System.Data.Services.Client (1)
System\Data\Services\Client\ALinq\DataServiceQueryProvider.cs (1)
124return (TElement)Convert.ChangeType(((DataServiceQuery<TElement>)query).GetQuerySetCount(this.Context), typeof(TElement), System.Globalization.CultureInfo.InvariantCulture.NumberFormat);
System.Data.SqlXml (1)
System\Xml\Xsl\Runtime\XmlQueryRuntime.cs (1)
479value = Convert.ChangeType(value, destinationType, CultureInfo.InvariantCulture);
System.Web.DynamicData (2)
DynamicData\Util\Misc.cs (2)
93return Convert.ChangeType(value, type, CultureInfo.CurrentCulture); 164return Convert.ChangeType(enumValue, Enum.GetUnderlyingType(enumType), CultureInfo.InvariantCulture);
System.Web.Services (1)
System\Web\Services\Protocols\Scalars.cs (1)
38return Convert.ChangeType(value, type, CultureInfo.InvariantCulture);
System.Windows.Forms (7)
winforms\Managed\System\WinForms\Binding.cs (4)
684cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 699cevent.Value = Convert.ChangeType(cevent.Value, cevent.DesiredType, CultureInfo.CurrentCulture); 752object ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture); 823ret = Convert.ChangeType(value, type, CultureInfo.CurrentCulture);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2Enum.cs (1)
158v = Convert.ChangeType(v, values[0].GetType(), CultureInfo.InvariantCulture);
winforms\Managed\System\WinForms\ComponentModel\COM2Interop\COM2IPerPropertyBrowsingHandler.cs (1)
299valueItems[i] = Convert.ChangeType(valueItems[i], targetType, CultureInfo.InvariantCulture);
winforms\Managed\System\WinForms\Formatter.cs (1)
356return Convert.ChangeType(value, type, formatInfo);
System.Workflow.Activities (2)
Rules\Expressions.cs (1)
2088Convert.ChangeType(fromValueDefault, toType2, CultureInfo.CurrentCulture);
Rules\RuleValidation.cs (1)
2270System.Convert.ChangeType(primitive.Value, lhsType, CultureInfo.CurrentCulture);
System.Workflow.ComponentModel (6)
AuthoringOM\Bind.cs (1)
1222arg = Convert.ChangeType(argName, typeof(System.Int32), CultureInfo.InvariantCulture);
AuthoringOM\Serializer\WorkflowMarkupSerializer.cs (5)
1161if (defaultValueAttr.Value is IConvertible && value is IConvertible && object.Equals(Convert.ChangeType(defaultValueAttr.Value, property.PropertyType, CultureInfo.InvariantCulture), Convert.ChangeType(value, property.PropertyType, CultureInfo.InvariantCulture))) 1244propVal = Convert.ChangeType(value, propertyType, CultureInfo.InvariantCulture); 1287propVal = Convert.ChangeType(value, propertyType, CultureInfo.InvariantCulture); 1755obj = Convert.ChangeType(stringValue, type, CultureInfo.InvariantCulture);
System.Xml (1)
System\Xml\Serialization\XmlSerializationWriterILGen.cs (1)
2064ilg.Ldc(Convert.ChangeType(value, source.Type, CultureInfo.InvariantCulture));
WindowsBase (1)
Shared\MS\Utility\TraceProvider.cs (1)
293data = Convert.ChangeType(data, Enum.GetUnderlyingType(dataType), CultureInfo.InvariantCulture);