/// <summary> /// Concatenates a specified separator String between each converted element of a specified collection, /// yielding a single concatenated string. /// </summary> public static string Join <T>(string separator, ICollection <T> collection, Converter <T, string> conversion) { if (collection == null) { throw new ArgumentNullException("collection"); } if (conversion == null) { throw new ArgumentNullException("conversion"); } return(Join(separator, CollectionUtility.ToArray(collection), conversion)); }
/// <summary> /// Converts two UInt16 values into a UInt32 /// </summary> /// <param name="highOrderValue"></param> /// <param name="lowOrderValue"></param> /// <returns></returns> public static uint GetUInt32(ushort highOrderValue, ushort lowOrderValue) { return(BitConverter.ToUInt32(CollectionUtility.Concat(BitConverter.GetBytes(lowOrderValue), BitConverter.GetBytes(highOrderValue)), 0)); }
/// <summary> /// Converts two UInt16 values into a IEEE 32 floating point format /// </summary> /// <param name="highOrderValue">High order ushort value</param> /// <param name="lowOrderValue">Low order ushort value</param> /// <returns>IEEE 32 floating point value</returns> public static float GetSingle(ushort highOrderValue, ushort lowOrderValue) { return(BitConverter.ToSingle(CollectionUtility.Concat(BitConverter.GetBytes(lowOrderValue), BitConverter.GetBytes(highOrderValue)), 0)); }