Which property is the same in the OpenFileDialog and the SaveFileDialog control?

  1. FileName

  2. Filter

  3. InitialDirectory

  4. Both a and b.

  5. All of the above.


Correct Option: E

AI Explanation

To answer this question, let's go through each option to understand why it is correct or incorrect:

Option A) FileName - This option is correct because both the OpenFileDialog and the SaveFileDialog controls have a FileName property. This property allows the user to specify or retrieve the file name and path selected or entered in the dialog box.

Option B) Filter - This option is correct because both the OpenFileDialog and the SaveFileDialog controls have a Filter property. This property allows the user to specify the file types that are displayed in the dialog box.

Option C) InitialDirectory - This option is correct because both the OpenFileDialog and the SaveFileDialog controls have an InitialDirectory property. This property allows the user to specify the initial directory that is displayed in the dialog box.

Option D) Both a and b - This option is incorrect because it only includes the FileName and Filter properties, but does not include the InitialDirectory property.

Option E) All of the above - This option is correct because it includes all three properties: FileName, Filter, and InitialDirectory. All these properties are present in both the OpenFileDialog and the SaveFileDialog controls.

The correct answer is E. All of the above. This option is correct because all three properties - FileName, Filter, and InitialDirectory - are present in both the OpenFileDialog and the SaveFileDialog controls.

Find more quizzes: