QUIZ 2 # OOP

Exception - They can be caused by various factors such as user input, hardware failures, or logical errors in the code.

Custom Exception - These exceptions are created by the developer to handle specific scenarios that are not covered by the system-defined exceptions.

Exception - These are unexpected events or conditions that occur during the execution of a program and disrupt the normal flow of instructions.

throw - It is typically used in situations where a specific error condition is detected and needs to be handled.

Text Data - It is a type of data that store data in human-readable form. They contain characters, words, and lines that can be viewed and edited with a text editor.

StreamReader - It is a class in C# is used for reading text from a stream, which can be a file, a network connection, or any other input source.

ReadToEnd - Reads all characters from the current position to the end of the stream.

Finally - This block of code is executed regardless of whether an exception occurs or not. It is often used for cleanup operations, such as releasing resources.

WriteLine - Writes a specified string to the stream with a newline character at the end.

System-Defined Exception - These exceptions are predefined by the .NET framework and are raised in response to specific error conditions.

try - Used to enclose the code that might throw an exception. It defines a block of code where exceptions can occur.

catch - Used to specify the type of exception that can be caught and the code to execute if that type of exception occurs.

NullReferenceException - Occurs when trying to access a member (such as a method or property) of a null object reference.

Exception Class - Developers can create their own custom exceptions by deriving from the base this class.

Binary Data - It is a type of data that store data in a format that is not directly human-readable.

File.Exists - A method in C# that allows you to check if a file is already there at a specified path.

FileOpen - It returns a 'FileStream' object that can be used for reading from or writing to the file.

BinaryReader - It reads binary data from a stream and converts it to the appropriate data types.

File I/O - Refers to the process of reading from and writing to files on a computer's storage system.

File.Create - It is used to create a new file. If the file already exists, it will overwrite it.