- using System;
- using System.IO;
- public class ForgetCode
- {
- public static void Main()
- {
- string str = "Coming from Forget Code";
- char[] b = new char[str.Length];
- using (StringReader sr = new StringReader(str))
- {
- // Read 15 characters from the string into the array.
- sr.Read(b, 0, 15);
- Console.WriteLine(b);
- // Read the rest of the string starting at the current string position.
- // Put in the array starting at the 6th array member.
- sr.Read(b, 6, str.Length-15);
- Console.WriteLine(b);
- }
- }
- }
- sr.Read(b, 6, str.Length-15);
- Console.WriteLine(b);