c# - How to get System.IO.Stream from a String Object -
c# - How to get System.IO.Stream from a String Object -
i have string object. need pass info object of type xyz. object of type xyz taking system.io.stream. how convert string info stream object of xyz type can utilize string data?
you'll have pick text encoding utilize translate string byte array, utilize memorystream phone call function. example:
using(system.io.memorystream ms = new system.io.memorystream( system.text.encoding.utf16.getbytes(yourstring))) { xyz(ms); } you can alter utf16 whatever encoding you'd utilize pass string.
c# string
Comments
Post a Comment