I used a mix of answers like this:
public static Stream ToStream(this string str, Encoding enc = null) { enc = enc ?? Encoding.UTF8; return new MemoryStream(enc.GetBytes(str ?? "")); } andAnd then iI use it like this :
String someStr="This is a Test"; Encoding enc = getEncodingFromSomeWhere(); using (Stream stream = someStr.ToStream(enc)) { //do Do something with the stream.... }