Middle 1

1. Write a program to create and store information in a text file.

Expected Output: 

The file test.txt created successfully...!

2. Write a program in to read an existing file.

Expected Output: 

The content of the file test.txt is: Hello Bill Gates.

3. Write a program to write multiple lines in a text file.

Expected Output: 

The content of the file test.txt is:

line 1

line 2

line 3 

4. Write a program to read the file and store the lines into an array.

Expected Output:

Input the file name to be opened: test.txt

The content of the file test.txt are: 

line 1 

line 2 

line 3 

5. Write a C# program to find the size of a specified file in bytes.

Expected Output:

Size of a file: 31