@manhng

Welcome to my blog!

Work with file in c#

October 25, 2021 18:12

Working with Files in C# (edit)

C# Files & Directories (tutorialsteacher.com)

Working with Files in C# | CodeGuru

Working With File Class In C# (c-sharpcorner.com)

C# File tutorial - working with files in C# (zetcode.com)

Working with Files (Using C# and .NET Framework) - CodeProject

byte[]

Stream

File.Exists(
File.ReadAllBytes(
File.ReadAllLines(
File.ReadAllText(
File.Open(
File.Delete(

File.WriteAllBytes(
File.WriteAllLines(
File.WriteAllText(

File.WriteAllBytesAsync(
File.WriteAllLinesAsync(
File.WriteAllTextAsync(

StreamWriter

File.CreateText(
File.CreateTextAsync(

File.AppendText(
File.AppendTextAsync(

File.AppendAllText(
File.AppendAllTextAsync(

File.AppendAllLines(
File.AppendAllLinesAsync(

.Write(
.WriteAsync(

.WriteLine(
.WriteLineAsync(

.Flush(
.FlushAsync(

--------------------------------------------------
using FileStream fs = File.OpenWrite(path);

var data = "falcon\nhawk\nforest\ncloud\nsky";
byte[] bytes = Encoding.UTF8.GetBytes(data);

fs.Write(bytes, 0, bytes.Length);
--------------------------------------------------

Path.Combine(
Environment.GetFolderPath(

zetcode.com
tutorialspoint.com

Categories

Recent posts