Need a method prototype

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • EntryTeam
    New Member
    • Aug 2009
    • 55

    Need a method prototype

    class source code

    I'm having trouble understanding line 50 - System.Convert. ToString(s, 16).
    According to source code, 1st argument is char and second is radix.

    I couldn't find method description and I'm wondering what exactly method does to character and what method returns?

    P.S. I can only guess that method returns string, although I'm not sure.
  • tlhintoq
    Recognized Expert Specialist
    • Mar 2008
    • 3532

    #2
    Code:
    foreach (char s in value)
                {
                    if (_Ascii7BitSigns.LastIndexOf(s) > -1)
                        sb.Append(s);
                    else
                    {
    
                        string qp = string.Format("{0}{1}",
                            _equalsSign,
                            System.Convert.ToString(s, 16)).Replace(_equalsSign, replaceEqualSign);
                        sb.Append(qp);
                    }
                }
    First, you need to recognize that line 50 is only part of a single line of code, that has been placed on three lines separated at the parameters to make it more human readable.
    Code:
    string qp = string.Format("{0}{1}",
                            _equalsSign,
                            [B]System.Convert.ToString(s, 16))[/B].Replace(_equalsSign, replaceEqualSign);
    Originally posted by EntryTeam
    I couldn't find method description and I'm wondering what exactly method does to character and what method returns?
    It does very much what it implies... It takes the char and returns a string.

    The MSDN for this specific use

    Comment

    Working...