コード例 #1
0
ファイル: Byte.cs プロジェクト: wtgodbe/corert
        public String ToString(IFormatProvider provider)
        {
            Contract.Ensures(Contract.Result <String>() != null);
            // if (provider == null)
            // throw new ArgumentNullException("provider");

            return(FormatProvider.FormatInt32(_value, null, provider));
        }
コード例 #2
0
ファイル: SByte.cs プロジェクト: smartmaster/corert
        public String ToString(String format, IFormatProvider provider)
        {
            Contract.Ensures(Contract.Result <String>() != null);


            if (_value < 0 && format != null && format.Length > 0 && (format[0] == 'X' || format[0] == 'x'))
            {
                uint temp = (uint)(_value & 0x000000FF);
                return(FormatProvider.FormatUInt32(temp, format, provider));
            }
            return(FormatProvider.FormatInt32(_value, format, provider));
        }
コード例 #3
0
ファイル: Int32.cs プロジェクト: rdlaitila/corert
 public String ToString(String format, IFormatProvider provider)
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(FormatProvider.FormatInt32(m_value, format, provider));
 }
コード例 #4
0
ファイル: Int32.cs プロジェクト: rdlaitila/corert
 public override String ToString()
 {
     Contract.Ensures(Contract.Result <String>() != null);
     return(FormatProvider.FormatInt32(m_value, null, null));
 }