private static string Search(PhoneTrieNode Node, string num, int i)
 {
     if (Node == null)
     {
         return("");
     }
     if (i == num.Length)
     {
         if (Node.IsEnd)
         {
             return(Node.Name);
         }
         return("");
     }
     return(Search(Node.next[(int)num[i] - 48], num, i + 1));
 }
        private static PhoneTrieNode Insert(PhoneTrieNode Node, string num, int i, string CustomerName)
        {
            if (Node == null)
            {
                Node = new PhoneTrieNode();
            }

            if (i == num.Length)
            {
                Node.IsEnd = true;
                Node.Name  = CustomerName;
                return(Node);
            }

            Node.next[((int)num[i]) - 48] = Insert(Node.next[((int)num[i]) - 48], num, i + 1, CustomerName);
            return(Node);
        }
 public void Insert(string num, string name)
 {
     head = Insert(head, num, 0, name);
 }
 public PhoneTrie()
 {
     head = null;
 }