wasSharp – Diff between revs 27 and 48

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 27 Rev 48
Line 4... Line 4...
4 // rights of fair usage, the disclaimer and warranty conditions. // 4 // rights of fair usage, the disclaimer and warranty conditions. //
5 /////////////////////////////////////////////////////////////////////////// 5 ///////////////////////////////////////////////////////////////////////////
Line 6... Line 6...
6   6  
7 using System.IO; 7 using System.IO;
-   8 using System.Linq;
Line 8... Line 9...
8 using System.Linq; 9 using System.Text;
9   10  
10 namespace wasSharp 11 namespace wasSharp
11 { 12 {
Line 21... Line 22...
21 /// <returns>a combined path</returns> 22 /// <returns>a combined path</returns>
22 public static string PathCombine(params string[] paths) 23 public static string PathCombine(params string[] paths)
23 { 24 {
24 return paths.Aggregate((x, y) => Path.Combine(x, y)); 25 return paths.Aggregate((x, y) => Path.Combine(x, y));
25 } 26 }
-   27  
-   28 /// <summary>
-   29 /// Converts a byte array to a hexadecimal string.
-   30 /// </summary>
-   31 /// <param name="bytes"></param>
-   32 /// <returns></returns>
-   33 public static string ToHexString(this byte[] bytes)
-   34 {
-   35 StringBuilder str = new StringBuilder();
-   36  
-   37 for (int i = 0; i < bytes.Length; i++)
-   38 str.AppendFormat("{0:X2}", bytes[i]);
-   39  
-   40 return str.ToString();
-   41 }
26 } 42 }
27 } 43 }