C# Inheritance
In this tutorial, we will take a look at the base keyword in C#. Inheritance means that one class can inherit members from another class. This is one of the fundamental concepts in OOP(object-oriented programming).
In this tutorial, we will take a look at the base keyword in C#. Inheritance means that one class can inherit members from another class. This is one of the fundamental concepts in OOP(object-oriented programming).
In this tutorial, we will take a look at the IEnumerator and IEnumerable in C#. Making an object enumerable will allow us to iterate over it with something like the foreach loop. IEnumerable is an interface that specifies what has to be implemented to make an object iterable(an object that can be iterated over). For an object to be iterable it has to have a GetEnumerator() method that returns an object of type IEnumerator.
In this tutorial, we will learn about JSON serialization in C#. Serialization is when you take an object and convert it to a stream of bytes that can be then stored in a file, database or memory. This is useful if you want to store the state of your objects or send them over the network(for example an API). Of course, you can also deserialize a file/database entry back into an object.
In this tutorial, we will learn about binary serialization in C#. Serialization is when you take an object and convert it to a stream of bytes that can be then stored in a file, database or memory. This is useful if you want to store the state of your objects or send them over the network(for example an API). Of course, you can also deserialize a file/database entry back into an object.
In this tutorial, we will learn how to do XML serialization in C#. Serialization is when you take an object and convert it to a stream of bytes that can be then stored in a file, database or memory. This is useful if you want to store the state of your objects or send them over the network(for example an API). Of course, you can also deserialize a file/databese entry back into an object. We will alos se how to do that.
In this tutorial, we will learn how to use the as operator in C#. The as operator is used to cast objects into different types. It is similar to the is operator. They can both be used to check if an object is of a certain type. If the conversion is successful the converted object gets returned else a null will be returned.
In this tutorial, we will learn how to use the is operator in C#. The is operator is very similar to the as operator. They can both be used to check if an object is of a certain type. Additionally as can be used to perform type casting. If the object matches the specified data type true gets returned else false will be returned.
In this tutorial, we will learn about constants in C#. A constant is a variable that is marked with the const keyword. Such a variable can only have its value set once at compile-time, after that it can’t be changed anymore.
In this code snippet, we will take a look at conversion operator overloading in C#. Conversion operators can be overloaded just like regular operators. This is useful when you want to be able to convert your custom object to another type. We have two types of conversions, implicit and explicit. Implicit conversion can be “just done” no special syntax is required. Meanwhile, explicit conversion requires casting.
In this code snippet, we will take a look at reflection in C#. Reflection is used to get metadata(information) about an object at runtime. We can get members(properties, methods) of objects and their data types. Reflection is also used for late binding. The ability to see the metadata of an object is for example, useful is when you use generics, as you don’t necessarily know the data type of a generic member until the object is created.