Lost in the matrix

C/C++/C#/Java, Multithreading

/// <summary>
/// String2Stream
/// </summary>
/// <param name="str">la chaine</param>
/// <returns>le flux</returns>
public static Stream String2Stream(string str)
{
MemoryStream memStream = new MemoryStream();
byte[] data = Encoding.Unicode.GetBytes(str);
memStream.Write(data, 0, data.Length);
return (memStream as Stream);
}

1 commentaires:

merci

Enregistrer un commentaire