/// <summary> /// Copies data from an string to a character array /// </summary> /// <param name="destinationArray"></param> /// <param name="sourceValue"></param> public static void CopyValueToArray(char[] destinationArray, string sourceValue) { if (sourceValue != null) { FixedLengthString temp = new FixedLengthString(destinationArray.Length, sourceValue); char[] sourceArray = temp.Value.ToCharArray(); Array.Copy(sourceArray, destinationArray, sourceArray.Length > destinationArray.Length ? destinationArray.Length : sourceArray.Length); } else { throw new Exception("You must supply a valid string value"); } }