Beispiel #1
0
        static void Main(string[] args)
        {
            string regular    = "this\nis\na\nstring\twith\nescape\ncharacters";
            string withAtSign = @"this\nis\na\nstring\twith\nescape\ncharacters";

            string path = @"C:\Users\Katie Dwyer\workspace\c-base\module-1\18_FileIO_Writing_out\lecture-final\dotnet\Lecture\bin\Debug\netcoreapp2.2";

            Console.WriteLine("Regular string: " + regular);
            Console.WriteLine("With @ sign: " + withAtSign);

            //HardCodePath();

            //FileAndDirectories.UsingTheDirectoryClass();

            WritingTextFiles.WritingAFile();
            WritingTextFiles.WritingAFileWithNoPath();

            PerformanceDemo.SlowPerformance();
            PerformanceDemo.FastPerformance();

            LoopingCollectionToWriteFile.LoopingADictionaryToWriteAFile();
            ReadingAndWritingFiles.OpenAndWrite();
            BinaryImageManipulator.ReadFileIn();

            FileWrite();

            Console.Write("Press enter to finish");
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            BinaryImageManipulator.ReadFileIn();



            //Console.WriteLine("Type the name of the file in: ");
            //string path = Console.ReadLine();

            //string currentDirectory = Directory.GetCurrentDirectory();
            //string fullFilePath = Path.Combine(currentDirectory, path);

            //Console.WriteLine("Generating file at " + fullFilePath);

            //try
            //{
            //    using(StreamWriter sw = new StreamWriter(fullFilePath))
            //    {
            //        sw.WriteLine("Hello World!");
            //    }
            //}
            //catch(IOException ex)
            //{
            //    Console.WriteLine("An error occurred!");
            //    Console.WriteLine(ex.Message);
            //}
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            // Here are a few examples of reading in a file and writing out values
            // to demonstrate their value.
            //WritingTextFiles.WritingAFile();
            //BinaryFileWriter.WritePrimitiveValues();
            BinaryImageManipulator.FunWithPhoto();
            //PerformanceDemo.SlowPerformance();
            //PerformanceDemo.FastPerformance();


            Console.Write("Press enter to finish");
            Console.ReadLine();
        }
Beispiel #4
0
        static void Main(string[] args)
        {
            BinaryFileWriter.WritePrimitiveValues();
            BinaryImageManipulator.ReadFileIn();


            //string appdatapath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
            //Console.WriteLine(appdatapath);


            //Dictionary<string, string> hometowns = new Dictionary<string, string>()
            //{
            //    {"Josh", "Brunswick" },
            //    {"Craig", "Bainbridge" },
            //    {"JohnK", "Euclid" }
            //};

            //SaveDictionaryToFile(hometowns);
        }