public void CopyTo(IntPtr dst, StringFormat dstFormat) { using (HGlobalPtr pStr = new HGlobalPtr(dstFormat == StringFormat.Ansi ? Marshal.StringToHGlobalAnsi(value_) : Marshal.StringToHGlobalUni(value_))) { PInvokeHelper.Copy(pStr.Ptr, dst, Length * Data.BytesPerChar(dstFormat)); } }