No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
This is my code [code] using (StringWriter strWriter = new StringWriter()) { strWriter.WriteLine("Don't"); // Get a copy of the contents (stored in a string) and pump to console Console.WriteLine("Content of StringWriter:\n{0}", strWriter); StringBuilder sb = strWriter.GetStringBuilder(); Console.WriteLine("{0}", sb.Length); sb.Insert(0, "Hey!! "); Console.WriteLine("-> {0}", sb.ToString()); sb.Remove(0, "Hey!! ".Length); Console.WriteLine("-> {0}", sb.ToString()); … |
|
[code] using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; namespace FileApp { class Program { static void Main(string[] args) { Console.WriteLine("***** Simple IO with the File Type ******"); string[] myTasks = { "asdf", "qwerty", "awdx", "1234" }; // Write out all data to file on C drive. File.WriteAllLines(@"C:\tasks.txt", … |