415 lines
25 KiB
C#
415 lines
25 KiB
C#
using System;
|
|
using System.Globalization;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>Represents an 8-bit unsigned integer.</summary>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x02000013 RID: 19
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public struct Byte : IFormattable, IConvertible, IComparable, IComparable<byte>, IEquatable<byte>
|
|
{
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToType(System.Type,System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to <paramref name="type" />.</returns>
|
|
/// <param name="type">The type to which to convert this <see cref="T:System.Byte" /> value. </param>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> implementation that supplies information about the format of the returned value.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="type" /> is null. </exception>
|
|
/// <exception cref="T:System.InvalidCastException">The requested type conversion is not supported. </exception>
|
|
// Token: 0x060000F1 RID: 241 RVA: 0x0000525C File Offset: 0x0000345C
|
|
object IConvertible.ToType(Type targetType, IFormatProvider provider)
|
|
{
|
|
if (targetType == null)
|
|
{
|
|
throw new ArgumentNullException("targetType");
|
|
}
|
|
return Convert.ToType(this, targetType, provider, false);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToBoolean(System.IFormatProvider)" />. </summary>
|
|
/// <returns>true if the value of the current instance is not zero; otherwise, false.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F2 RID: 242 RVA: 0x0000528C File Offset: 0x0000348C
|
|
bool IConvertible.ToBoolean(IFormatProvider provider)
|
|
{
|
|
return Convert.ToBoolean(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToByte(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, unchanged.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F3 RID: 243 RVA: 0x00005298 File Offset: 0x00003498
|
|
byte IConvertible.ToByte(IFormatProvider provider)
|
|
{
|
|
return this;
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToChar(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.Char" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F4 RID: 244 RVA: 0x0000529C File Offset: 0x0000349C
|
|
char IConvertible.ToChar(IFormatProvider provider)
|
|
{
|
|
return Convert.ToChar(this);
|
|
}
|
|
|
|
/// <summary>This conversion is not supported. Attempting to use this method throws an <see cref="T:System.InvalidCastException" />.</summary>
|
|
/// <returns>This conversion is not supported. No value is returned.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
/// <exception cref="T:System.InvalidCastException">In all cases.</exception>
|
|
// Token: 0x060000F5 RID: 245 RVA: 0x000052A8 File Offset: 0x000034A8
|
|
DateTime IConvertible.ToDateTime(IFormatProvider provider)
|
|
{
|
|
throw new InvalidCastException();
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToDecimal(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.Decimal" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F6 RID: 246 RVA: 0x000052B0 File Offset: 0x000034B0
|
|
decimal IConvertible.ToDecimal(IFormatProvider provider)
|
|
{
|
|
return Convert.ToDecimal(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToDouble(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.Double" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F7 RID: 247 RVA: 0x000052BC File Offset: 0x000034BC
|
|
double IConvertible.ToDouble(IFormatProvider provider)
|
|
{
|
|
return Convert.ToDouble(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToInt16(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to an <see cref="T:System.Int16" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F8 RID: 248 RVA: 0x000052C8 File Offset: 0x000034C8
|
|
short IConvertible.ToInt16(IFormatProvider provider)
|
|
{
|
|
return Convert.ToInt16(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToInt32(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to an <see cref="T:System.Int32" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000F9 RID: 249 RVA: 0x000052D4 File Offset: 0x000034D4
|
|
int IConvertible.ToInt32(IFormatProvider provider)
|
|
{
|
|
return Convert.ToInt32(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToInt64(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to an <see cref="T:System.Int64" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FA RID: 250 RVA: 0x000052E0 File Offset: 0x000034E0
|
|
long IConvertible.ToInt64(IFormatProvider provider)
|
|
{
|
|
return Convert.ToInt64(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToSByte(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to an <see cref="T:System.SByte" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FB RID: 251 RVA: 0x000052EC File Offset: 0x000034EC
|
|
sbyte IConvertible.ToSByte(IFormatProvider provider)
|
|
{
|
|
return Convert.ToSByte(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToSingle(System.IFormatProvider)" />. </summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.Single" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FC RID: 252 RVA: 0x000052F8 File Offset: 0x000034F8
|
|
float IConvertible.ToSingle(IFormatProvider provider)
|
|
{
|
|
return Convert.ToSingle(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToUInt16(System.IFormatProvider)" />.</summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.UInt16" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FD RID: 253 RVA: 0x00005304 File Offset: 0x00003504
|
|
ushort IConvertible.ToUInt16(IFormatProvider provider)
|
|
{
|
|
return Convert.ToUInt16(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToUInt32(System.IFormatProvider)" />.</summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.UInt32" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FE RID: 254 RVA: 0x00005310 File Offset: 0x00003510
|
|
uint IConvertible.ToUInt32(IFormatProvider provider)
|
|
{
|
|
return Convert.ToUInt32(this);
|
|
}
|
|
|
|
/// <summary>For a description of this member, see <see cref="M:System.IConvertible.ToUInt64(System.IFormatProvider)" />.</summary>
|
|
/// <returns>The value of the current instance, converted to a <see cref="T:System.UInt64" />.</returns>
|
|
/// <param name="provider">This parameter is ignored.</param>
|
|
// Token: 0x060000FF RID: 255 RVA: 0x0000531C File Offset: 0x0000351C
|
|
ulong IConvertible.ToUInt64(IFormatProvider provider)
|
|
{
|
|
return Convert.ToUInt64(this);
|
|
}
|
|
|
|
/// <summary>Compares this instance to a specified object and returns an indication of their relative values.</summary>
|
|
/// <returns>A signed integer that indicates the relative order of this instance and <paramref name="value" />.Return Value Description Less than zero This instance is less than <paramref name="value" />. Zero This instance is equal to <paramref name="value" />. Greater than zero This instance is greater than <paramref name="value" />.-or- <paramref name="value" /> is null. </returns>
|
|
/// <param name="value">An object to compare, or null. </param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="value" /> is not a <see cref="T:System.Byte" />. </exception>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x06000100 RID: 256 RVA: 0x00005328 File Offset: 0x00003528
|
|
public int CompareTo(object value)
|
|
{
|
|
if (value == null)
|
|
{
|
|
return 1;
|
|
}
|
|
if (!(value is byte))
|
|
{
|
|
throw new ArgumentException(Locale.GetText("Value is not a System.Byte."));
|
|
}
|
|
byte b = (byte)value;
|
|
if (this == b)
|
|
{
|
|
return 0;
|
|
}
|
|
if (this > b)
|
|
{
|
|
return 1;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/// <summary>Returns a value indicating whether this instance is equal to a specified object.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is an instance of <see cref="T:System.Byte" /> and equals the value of this instance; otherwise, false.</returns>
|
|
/// <param name="obj">An object to compare with this instance, or null. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x06000101 RID: 257 RVA: 0x00005374 File Offset: 0x00003574
|
|
public override bool Equals(object obj)
|
|
{
|
|
return obj is byte && (byte)obj == this;
|
|
}
|
|
|
|
/// <summary>Returns the hash code for this instance.</summary>
|
|
/// <returns>A hash code for the current <see cref="T:System.Byte" />.</returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x06000102 RID: 258 RVA: 0x00005390 File Offset: 0x00003590
|
|
public override int GetHashCode()
|
|
{
|
|
return (int)this;
|
|
}
|
|
|
|
/// <summary>Compares this instance to a specified 8-bit unsigned integer and returns an indication of their relative values.</summary>
|
|
/// <returns>A signed integer that indicates the relative order of this instance and <paramref name="value" />.Return Value Description Less than zero This instance is less than <paramref name="value" />. Zero This instance is equal to <paramref name="value" />. Greater than zero This instance is greater than <paramref name="value" />. </returns>
|
|
/// <param name="value">An 8-bit unsigned integer to compare. </param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x06000103 RID: 259 RVA: 0x00005394 File Offset: 0x00003594
|
|
public int CompareTo(byte value)
|
|
{
|
|
if (this == value)
|
|
{
|
|
return 0;
|
|
}
|
|
if (this > value)
|
|
{
|
|
return 1;
|
|
}
|
|
return -1;
|
|
}
|
|
|
|
/// <summary>Returns a value indicating whether this instance and a specified <see cref="T:System.Byte" /> object represent the same value.</summary>
|
|
/// <returns>true if <paramref name="obj" /> is equal to this instance; otherwise, false.</returns>
|
|
/// <param name="obj">A <see cref="T:System.Byte" /> object to compare to this instance.</param>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x06000104 RID: 260 RVA: 0x000053AC File Offset: 0x000035AC
|
|
public bool Equals(byte obj)
|
|
{
|
|
return this == obj;
|
|
}
|
|
|
|
/// <summary>Converts the string representation of a number in a specified culture-specific format to its <see cref="T:System.Byte" /> equivalent.</summary>
|
|
/// <returns>The <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" />.</returns>
|
|
/// <param name="s">A string containing a number to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style. </param>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> that supplies culture-specific parsing information about <paramref name="s" />. If <paramref name="provider" /> is null, the thread current culture is used. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="s" /> is null. </exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="s" /> is not of the correct format. </exception>
|
|
/// <exception cref="T:System.OverflowException">
|
|
/// <paramref name="s" /> represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. </exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x06000105 RID: 261 RVA: 0x000053B4 File Offset: 0x000035B4
|
|
public static byte Parse(string s, IFormatProvider provider)
|
|
{
|
|
return byte.Parse(s, NumberStyles.Integer, provider);
|
|
}
|
|
|
|
/// <summary>Converts the string representation of a number in a specified style to its <see cref="T:System.Byte" /> equivalent.</summary>
|
|
/// <returns>The <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" />.</returns>
|
|
/// <param name="s">A string containing a number to convert. The string is interpreted using the style specified by <paramref name="style" />. </param>
|
|
/// <param name="style">A bitwise combination of <see cref="T:System.Globalization.NumberStyles" /> values that indicates the style elements that can be present in <paramref name="s" />. A typical value to specify is <see cref="F:System.Globalization.NumberStyles.Integer" />.</param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="s" /> is null. </exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="s" /> is not of the correct format. </exception>
|
|
/// <exception cref="T:System.OverflowException">
|
|
/// <paramref name="s" /> represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. -or-<paramref name="s" /> includes non-zero, fractional digits.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="style" /> is not a <see cref="T:System.Globalization.NumberStyles" /> value. -or-<paramref name="style" /> is not a combination of <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> and <see cref="F:System.Globalization.NumberStyles.HexNumber" /> values.</exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x06000106 RID: 262 RVA: 0x000053C0 File Offset: 0x000035C0
|
|
public static byte Parse(string s, NumberStyles style)
|
|
{
|
|
return byte.Parse(s, style, null);
|
|
}
|
|
|
|
/// <summary>Converts the string representation of a number in a specified style and culture-specific format to its <see cref="T:System.Byte" /> equivalent.</summary>
|
|
/// <returns>The <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" />.</returns>
|
|
/// <param name="s">A string containing a number to convert. The string is interpreted using the style specified by <paramref name="style" />. </param>
|
|
/// <param name="style">A bitwise combination of <see cref="T:System.Globalization.NumberStyles" /> values that indicates the style elements that can be present in <paramref name="s" />. A typical value to specify is <see cref="F:System.Globalization.NumberStyles.Integer" />.</param>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> object that supplies culture-specific information about the format of <paramref name="s" />. If <paramref name="provider" /> is null, the thread current culture is used. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="s" /> is null. </exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="s" /> is not of the correct format. </exception>
|
|
/// <exception cref="T:System.OverflowException">
|
|
/// <paramref name="s" /> represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. -or-<paramref name="s" /> includes non-zero, fractional digits.</exception>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="style" /> is not a <see cref="T:System.Globalization.NumberStyles" /> value. -or-<paramref name="style" /> is not a combination of <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> and <see cref="F:System.Globalization.NumberStyles.HexNumber" /> values.</exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x06000107 RID: 263 RVA: 0x000053CC File Offset: 0x000035CC
|
|
public static byte Parse(string s, NumberStyles style, IFormatProvider provider)
|
|
{
|
|
uint num = uint.Parse(s, style, provider);
|
|
if (num > 255U)
|
|
{
|
|
throw new OverflowException(Locale.GetText("Value too large."));
|
|
}
|
|
return (byte)num;
|
|
}
|
|
|
|
/// <summary>Converts the string representation of a number to its <see cref="T:System.Byte" /> equivalent.</summary>
|
|
/// <returns>The <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" />.</returns>
|
|
/// <param name="s">A string containing a number to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style. </param>
|
|
/// <exception cref="T:System.ArgumentNullException">
|
|
/// <paramref name="s" /> is null. </exception>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="s" /> is not of the correct format. </exception>
|
|
/// <exception cref="T:System.OverflowException">
|
|
/// <paramref name="s" /> represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. </exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x06000108 RID: 264 RVA: 0x00005400 File Offset: 0x00003600
|
|
public static byte Parse(string s)
|
|
{
|
|
return byte.Parse(s, NumberStyles.Integer, null);
|
|
}
|
|
|
|
/// <summary>Tries to convert the string representation of a number to its <see cref="T:System.Byte" /> equivalent, and returns a value that indicates whether the conversion succeeded.</summary>
|
|
/// <returns>true if <paramref name="s" /> was converted successfully; otherwise, false. </returns>
|
|
/// <param name="s">A string that contains a number to convert. The string is interpreted using the <see cref="F:System.Globalization.NumberStyles.Integer" /> style.</param>
|
|
/// <param name="result">When this method returns, contains the <see cref="T:System.Byte" /> value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. This parameter is passed uninitialized.</param>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x06000109 RID: 265 RVA: 0x0000540C File Offset: 0x0000360C
|
|
public static bool TryParse(string s, out byte result)
|
|
{
|
|
return byte.TryParse(s, NumberStyles.Integer, null, out result);
|
|
}
|
|
|
|
/// <summary>Converts the string representation of a number in a specified style and culture-specific format to its <see cref="T:System.Byte" /> equivalent. A return value indicates whether the conversion succeeded or failed.</summary>
|
|
/// <returns>true if <paramref name="s" /> was converted successfully; otherwise, false.</returns>
|
|
/// <param name="s">A string containing a number to convert. The string is interpreted using the style specified by <paramref name="style" />. </param>
|
|
/// <param name="style">A bitwise combination of <see cref="T:System.Globalization.NumberStyles" /> values that indicates the style elements that can be present in <paramref name="s" />. A typical value to specify is <see cref="F:System.Globalization.NumberStyles.Integer" />.</param>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> object that supplies culture-specific formatting information about <paramref name="s" />. If <paramref name="provider" /> is null, the thread current culture is used. </param>
|
|
/// <param name="result">When this method returns, contains the 8-bit unsigned integer value equivalent to the number contained in <paramref name="s" /> if the conversion succeeded, or zero if the conversion failed. The conversion fails if the <paramref name="s" /> parameter is null, is not of the correct format, or represents a number less than <see cref="F:System.Byte.MinValue" /> or greater than <see cref="F:System.Byte.MaxValue" />. This parameter is passed uninitialized. </param>
|
|
/// <exception cref="T:System.ArgumentException">
|
|
/// <paramref name="style" /> is not a <see cref="T:System.Globalization.NumberStyles" /> value. -or-<paramref name="style" /> is not a combination of <see cref="F:System.Globalization.NumberStyles.AllowHexSpecifier" /> and <see cref="F:System.Globalization.NumberStyles.HexNumber" /> values.</exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x0600010A RID: 266 RVA: 0x00005418 File Offset: 0x00003618
|
|
public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out byte result)
|
|
{
|
|
result = 0;
|
|
uint num;
|
|
if (!uint.TryParse(s, style, provider, out num))
|
|
{
|
|
return false;
|
|
}
|
|
if (num > 255U)
|
|
{
|
|
return false;
|
|
}
|
|
result = (byte)num;
|
|
return true;
|
|
}
|
|
|
|
/// <summary>Converts the value of the current <see cref="T:System.Byte" /> object to its equivalent string representation.</summary>
|
|
/// <returns>The string representation of the value of this object, which consists of a sequence of digits that range from 0 to 9 with no leading zeroes.</returns>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x0600010B RID: 267 RVA: 0x0000544C File Offset: 0x0000364C
|
|
public override string ToString()
|
|
{
|
|
return NumberFormatter.NumberToString((int)this, null);
|
|
}
|
|
|
|
/// <summary>Converts the value of the current <see cref="T:System.Byte" /> object to its equivalent string representation using the specified format.</summary>
|
|
/// <returns>The string representation of the current <see cref="T:System.Byte" /> object, formatted as specified by the <paramref name="format" /> parameter.</returns>
|
|
/// <param name="format">A numeric format string.</param>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="format" /> includes an unsupported specifier. Supported format specifiers are listed in the Remarks section.</exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x0600010C RID: 268 RVA: 0x00005458 File Offset: 0x00003658
|
|
public string ToString(string format)
|
|
{
|
|
return this.ToString(format, null);
|
|
}
|
|
|
|
/// <summary>Converts the numeric value of the current <see cref="T:System.Byte" /> object to its equivalent string representation using the specified culture-specific formatting information.</summary>
|
|
/// <returns>The string representation of the value of this object in the format specified by the <paramref name="provider" /> parameter.</returns>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> object that supplies culture-specific formatting information.</param>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x0600010D RID: 269 RVA: 0x00005464 File Offset: 0x00003664
|
|
public string ToString(IFormatProvider provider)
|
|
{
|
|
return NumberFormatter.NumberToString((int)this, provider);
|
|
}
|
|
|
|
/// <summary>Converts the value of the current <see cref="T:System.Byte" /> object to its equivalent string representation using the specified format and culture-specific formatting information.</summary>
|
|
/// <returns>The string representation of the current <see cref="T:System.Byte" /> object, formatted as specified by the <paramref name="format" /> and <paramref name="provider" /> parameters.</returns>
|
|
/// <param name="format">A standard or custom numeric format string.</param>
|
|
/// <param name="provider">An <see cref="T:System.IFormatProvider" /> object that supplies culture-specific formatting information.</param>
|
|
/// <exception cref="T:System.FormatException">
|
|
/// <paramref name="format" /> includes an unsupported specifier. Supported format specifiers are listed in the Remarks section.</exception>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x0600010E RID: 270 RVA: 0x00005470 File Offset: 0x00003670
|
|
public string ToString(string format, IFormatProvider provider)
|
|
{
|
|
return NumberFormatter.NumberToString(format, this, provider);
|
|
}
|
|
|
|
/// <summary>Returns the <see cref="T:System.TypeCode" /> for value type <see cref="T:System.Byte" />.</summary>
|
|
/// <returns>The enumerated constant, <see cref="F:System.TypeCode.Byte" />.</returns>
|
|
/// <filterpriority>2</filterpriority>
|
|
// Token: 0x0600010F RID: 271 RVA: 0x0000547C File Offset: 0x0000367C
|
|
public TypeCode GetTypeCode()
|
|
{
|
|
return TypeCode.Byte;
|
|
}
|
|
|
|
/// <summary>Represents the smallest possible value of a <see cref="T:System.Byte" />. This field is constant.</summary>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x04000012 RID: 18
|
|
public const byte MinValue = 0;
|
|
|
|
/// <summary>Represents the largest possible value of a <see cref="T:System.Byte" />. This field is constant.</summary>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x04000013 RID: 19
|
|
public const byte MaxValue = 255;
|
|
|
|
// Token: 0x04000014 RID: 20
|
|
internal byte m_value;
|
|
}
|
|
}
|