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