0 votes
in General by (29.9k points)
closed by
Choose the filemode method which is used to create a new output file with the condition that the file with same name if exists will destroy the old file:

(a) FileMode.CreateNew

(b) FileMode.Create

(c) FileMode.OpenOrCreate

(d) FileMode.Truncate

1 Answer

0 votes
by (29.9k points)
selected by
Best answer
The correct choice is (b) FileMode.Create

The explanation: Creates a new output file. Any pre-existing file with the same name will be destroyed.

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.