by JasonRShaver
22. April 2009 16:57
Sometimes you just want to convert a byte array to an easy to use string. You could use Base64 strings, but then you have to read and enter upper and lower case chars without error. I find it easier to just convert it to a hex string (0-9, A-F). Turns out Microsoft made an easy way to do this.
Enter the 'System.Runtime.Remoting.Metadata.W3cXsd2001' namespace (part of the core lib).
private String _ConvertByteToString(byte[] input)
{
SoapHexBinary hexBinary = new SoapHexBinary(input);
return hexBinary.ToString();
}
private byte[] _ConvertStringToByte(String input)
{
SoapHexBinary hexBinary = SoapHexBinary.Parse(input);
return hexBinary.Value;
}
fa4828e8-cf77-4dcf-9287-522b948f65d0|0|.0
Tags:
Blog
by JasonRShaver
19. April 2009 16:57
At this years NCO Spring Ahead 5K, I just ran a 27:57, which is better then the 30:00 time I got last year at the same race (15th in my age group), AND better then 28:07 I got as my previous personal best.
5k Race Results
Place Div Sex Name No. S Age City St Time Pace
===== === === ===================== ===== = ==== ============ == ======= =====
100 9 72 JASON SHAVER 1335 M 28 BOLINGBROOK IL 27:57 9:00
172 5 65 KELLY SHAVER 1334 F 27 BOLINGBROOK IL 30:17 9:45
215 18 120 JORDAN DUERKSEN 1423 M 38 PLAINFIELD IL 32:21 10:25
382 people ran the 5k
aa24cbb9-66a6-43bf-9498-e2870120f00d|0|.0
Tags:
Blog