String Writer
In this chapter you will learn:
Writing to a string
using System;/*from j a v a 2 s . co m*/
using System.IO;
public class MainClass
{
public static void Main()
{
StringWriter writer = new StringWriter();
writer.Write("Name: {0}, Age: {1}", "Henry", 32);
Console.WriteLine(writer.ToString());
}
}
The code above generates the following result.
Next chapter...
What you will learn in the next chapter: