19. Which method provides the functionality to display a dialog box at runtime?
The ShowDialog() method is used to display the dialog box at run time.
20. What does the PerformStep() method do?
The PerformStep() method increases the value of Progress bar according to the amount set by the Stepproperty.
21. Write a method to get only the name of a file from the complete path string in C#.
Use a FileInfo class and instantiate its object with the full path as the constructor argument and then simply call the FileInfo.Name file and you will get just the name of the file.
22. What does the OpenFile() method of the OpenFileDialog control do?
The OpenFile() method opens the file selected by the user with read-only permission. The file is specified by the FileName property.
23. How do you retrieve the customized properties of a .NET application from the XML .config file?
Initialize an instance of the AppSettingsReader class. Call the GetValue() method of theAppSettingsReader class, passing in the name of the property and the type expected. Finally, assign the result to the appropriate variable.
24. What is the difference between a toolstrip drop-down button and a toolstrip split button?
The difference between a toolstrip drop-down button and a toolstrip split button is that a toolstrip split button is a combination of two controls - a push button and a drop-down button; whereas, a toolstrip drop-down button is a single control.
The ShowDialog() method is used to display the dialog box at run time.
20. What does the PerformStep() method do?
The PerformStep() method increases the value of Progress bar according to the amount set by the Stepproperty.
21. Write a method to get only the name of a file from the complete path string in C#.
Use a FileInfo class and instantiate its object with the full path as the constructor argument and then simply call the FileInfo.Name file and you will get just the name of the file.
22. What does the OpenFile() method of the OpenFileDialog control do?
The OpenFile() method opens the file selected by the user with read-only permission. The file is specified by the FileName property.
23. How do you retrieve the customized properties of a .NET application from the XML .config file?
Initialize an instance of the AppSettingsReader class. Call the GetValue() method of theAppSettingsReader class, passing in the name of the property and the type expected. Finally, assign the result to the appropriate variable.
24. What is the difference between a toolstrip drop-down button and a toolstrip split button?
The difference between a toolstrip drop-down button and a toolstrip split button is that a toolstrip split button is a combination of two controls - a push button and a drop-down button; whereas, a toolstrip drop-down button is a single control.