Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I use this code:
C#
//k[z] is my array to string
     string hex = "";
                      
                      foreach (char c in k[z])
                      {
                          int tmp = c;
                          hex += string.Format("{0:x2}", (uint)System.Convert.ToUInt32(tmp.ToString()));
}
in another place
i want "hex" justlike "hex" comeback to first shape.
Posted
Updated 27-Jun-12 0:28am
v11
Comments
Herman<T>.Instance 27-Jun-12 6:08am    
why not:
hex += string.Format("{0:x2}", tmp);
Slacker007 27-Jun-12 6:19am    
Remove your comment and post it as a solution. :)

1 solution

ad advice from Slacker007;

why not:hex += string.Format("{0:x2}", tmp);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900