[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Pascal Cloup

9/7/2007 9:20:00 AM

Hello,

What is the siplest way to convert a System::String to un unmanaged array of
ASCII char[]?

thanks in advance

Pascal


1 Answer

Doug Semler

9/7/2007 3:26:00 PM

0

On Sep 7, 5:19 am, "Pascal Cloup" <pascal-cl...@biogesta.fr> wrote:
> Hello,
>
> What is the siplest way to convert a System::String to un unmanaged array of
> ASCII char[]?
>
> thanks in advance
>
> Pascal

IntPtr p = Marshal.StringToHGlobal{Ansi|Auto|Uni}(s);

Use the one appropriate for your needs.

Don't forget to Marshal.FreeHGlobal(p) when done.