コード例 #1
0
        // Token: 0x06000C55 RID: 3157 RVA: 0x0002DE6C File Offset: 0x0002C06C
        internal static string ToString(Thickness th, CultureInfo cultureInfo)
        {
            char          numericListSeparator = TokenizerHelper.GetNumericListSeparator(cultureInfo);
            StringBuilder stringBuilder        = new StringBuilder(64);

            stringBuilder.Append(LengthConverter.ToString(th.Left, cultureInfo));
            stringBuilder.Append(numericListSeparator);
            stringBuilder.Append(LengthConverter.ToString(th.Top, cultureInfo));
            stringBuilder.Append(numericListSeparator);
            stringBuilder.Append(LengthConverter.ToString(th.Right, cultureInfo));
            stringBuilder.Append(numericListSeparator);
            stringBuilder.Append(LengthConverter.ToString(th.Bottom, cultureInfo));
            return(stringBuilder.ToString());
        }
コード例 #2
0
        //-------------------------------------------------------------------
        //
        //  Internal Methods
        //
        //-------------------------------------------------------------------

        #region Internal Methods

        static internal string ToString(Thickness th, CultureInfo cultureInfo)
        {
            char listSeparator = TokenizerHelper.GetNumericListSeparator(cultureInfo);

            // Initial capacity [64] is an estimate based on a sum of:
            // 48 = 4x double (twelve digits is generous for the range of values likely)
            //  8 = 4x Unit Type string (approx two characters)
            //  4 = 4x separator characters
            StringBuilder sb = new StringBuilder(64);

            sb.Append(LengthConverter.ToString(th.Left, cultureInfo));
            sb.Append(listSeparator);
            sb.Append(LengthConverter.ToString(th.Top, cultureInfo));
            sb.Append(listSeparator);
            sb.Append(LengthConverter.ToString(th.Right, cultureInfo));
            sb.Append(listSeparator);
            sb.Append(LengthConverter.ToString(th.Bottom, cultureInfo));
            return(sb.ToString());
        }