46 lines
1.4 KiB
C#
46 lines
1.4 KiB
C#
using System;
|
|
using System.Globalization;
|
|
|
|
namespace System.ComponentModel
|
|
{
|
|
/// <summary>Provides a type converter to convert 32-bit unsigned integer objects to and from various other representations.</summary>
|
|
// Token: 0x020000D8 RID: 216
|
|
public class UInt32Converter : BaseNumberConverter
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.UInt32Converter" /> class. </summary>
|
|
// Token: 0x0600074E RID: 1870 RVA: 0x00013C5C File Offset: 0x00011E5C
|
|
public UInt32Converter()
|
|
{
|
|
this.InnerType = typeof(uint);
|
|
}
|
|
|
|
// Token: 0x170001BE RID: 446
|
|
// (get) Token: 0x0600074F RID: 1871 RVA: 0x00013C74 File Offset: 0x00011E74
|
|
internal override bool SupportHex
|
|
{
|
|
get
|
|
{
|
|
return true;
|
|
}
|
|
}
|
|
|
|
// Token: 0x06000750 RID: 1872 RVA: 0x00013C78 File Offset: 0x00011E78
|
|
internal override string ConvertToString(object value, NumberFormatInfo format)
|
|
{
|
|
return ((uint)value).ToString("G", format);
|
|
}
|
|
|
|
// Token: 0x06000751 RID: 1873 RVA: 0x00013C9C File Offset: 0x00011E9C
|
|
internal override object ConvertFromString(string value, NumberFormatInfo format)
|
|
{
|
|
return uint.Parse(value, NumberStyles.Integer, format);
|
|
}
|
|
|
|
// Token: 0x06000752 RID: 1874 RVA: 0x00013CAC File Offset: 0x00011EAC
|
|
internal override object ConvertFromString(string value, int fromBase)
|
|
{
|
|
return Convert.ToUInt32(value, fromBase);
|
|
}
|
|
}
|
|
}
|