public uint GetUInt32(string name) { Type foundType; object value = GetElement(name, out foundType) !; return(ReferenceEquals(foundType, typeof(uint)) ? (uint)value : _converter.ToUInt32(value)); }
public UInt32 GetUInt32(string name) { #if NOT_PFX object value = GetValue(name, typeof(System.UInt32)); return(converter.ToUInt32(value)); #else throw new NotSupportedException(); #endif }
public uint GetUInt32(String name) { Type foundType; Object value; value = GetElement(name, out foundType); if (Object.ReferenceEquals(foundType, typeof(uint))) { return((uint)value); } return(m_converter.ToUInt32(value)); }
internal static object Convert(IFormatterConverter formatterConverter, object value, TypeCode typeCode) { return(typeCode switch { TypeCode.Boolean => formatterConverter.ToBoolean(value), TypeCode.Byte => formatterConverter.ToBoolean(value), TypeCode.Char => formatterConverter.ToChar(value), TypeCode.DateTime => formatterConverter.ToDateTime(value), TypeCode.Decimal => formatterConverter.ToDecimal(value), TypeCode.Double => formatterConverter.ToDouble(value), TypeCode.Int16 => formatterConverter.ToInt16(value), TypeCode.Int32 => formatterConverter.ToInt32(value), TypeCode.Int64 => formatterConverter.ToInt64(value), TypeCode.SByte => formatterConverter.ToSByte(value), TypeCode.Single => formatterConverter.ToSingle(value), TypeCode.String => formatterConverter.ToString(value), TypeCode.UInt16 => formatterConverter.ToUInt16(value), TypeCode.UInt32 => formatterConverter.ToUInt32(value), TypeCode.UInt64 => formatterConverter.ToUInt64(value), _ => throw new NotSupportedException("Unsupported type code: " + typeCode), });
public UInt32 GetUInt32(string name) { object value = GetValue(name, typeof(System.UInt32)); return(converter.ToUInt32(value)); }
public uint GetUInt32(string name) { var value = GetValue(name, typeof(uint)); return(converter.ToUInt32(value)); }