Jet Ski Rental around Lake Conroe
June 12th, 2007 — Uncategorized
C# – Creating a stream from a string
June 12th, 2007 — Uncategorized
Ok. I’m a .net newbie (have been for the past few years.) But now I’m going to get passed all that, buckle down and learn it inside out.
One of the challenges that I have is some things require a “stream”. So, you have a value in a variable but you can’t use it because it isn’t a stream.
Well, finally got the solution to the problem:
StringReader strReader = new StringReader(stringVal);
Simple enough. StringReader is a stream, and it takes a string value.
I got this solution from: http://weblogs.asp.net/whaggard/archive/2004/09/23/233535.aspx