C# File I/O
Files are used to store the data permanently in the storage device with a specific name and path. And when we open the file in order to read or write, it becomes a stream. File Handling refers to the various …
Files are used to store the data permanently in the storage device with a specific name and path. And when we open the file in order to read or write, it becomes a stream. File Handling refers to the various …
We have already discussed the exception handling in C# and how to handle the exception if one exists. The exception discussed are raised by the CLR automatically, now we will see how we can manually raise an exception. In C#, …
An exception is an event that occurs during the execution of the program i.e. during run–time. This event is unexpected, not known by the program, and disrupts the normal flow of the code. So to handle such errors, we create …
In C#, String is the series of characters or array of characters that represents a text. It is of a reference type (Object) in c#. Various operations are performed on a string such as concatenation, comparison, getting substring, search, trim, …
Inheritance is an important pillar for the foundation of Object-Oriented Programming (OOP). It is a process in C# through which one class can acquire the fields and methods of another class. Inheritance allows us to inherit or acquire the features …
We have learned that the method can be overloaded in C#, in the same way, we can also overload the operator. We can perform the various operations with the same operator in C#. Operator overloading means performing different operations with …
Method overriding is done through inheritance, it allows us to define a method at a derived class with the same name present in a base class with the same signature and same return type then the method in a base …
A method is said to be overloaded if two or more methods having the same name but different parameters. The difference could be in a number of parameters or types of parameters so that compiler can tell the difference. The …
Polymorphism means having many forms. The word “poly” means many and “morphs” means form. Polymorphism is one of the core principles of object-oriented programming which means it is the way of performing some task in many ways. With polymorphism, a …
C# properties are the class members that provide a flexible way for the class to expose its private field. It provides a way to read, write, and perform some computation to the private fields of the class. These properties have …