Archives for C#
Understanding Delegates in C#
In the world of C# programming language, understanding the concept of delegates is essential for writing effective, flexible and clean code. C# is a general-purpose, object-oriented programming language designed by…
Using Variables
Variables in C# are containers inside the computer’s memory where you can place the data you need for your program. The term “variable” got its name from the fact that variables…
Named Arguments
Another way of passing arguments is by using named arguments. Named arguments free you from remembering or following the order of the parameters when passing arguments. In exchange, you have to…
Implicit Conversion
An implicit conversion of variables is a kind of conversion that is automatically done by the compiler. A variable of one data type can be implicitly converted to another data type provided…
503 Service unavailable
Hypertext Transfer Protocol (HTTP) 503 Service unavailable service error message code means that perhaps the server is not ready to process the request. Common reasons are a server down or jammed…
C# ArrayList
The ArrayList class permits you to store values of various information varieties and additionally offers you the power to feature and take away components any time you would like. the…
Virtual Methods
Virtual methods are methods of a base class that can be overridden by a method in a derived class to provide a different implementation of that method. For example, you have…
Expression-Bodied Members
Expression-bodied members is a feature introduced in C# 6 that allows you to use lambda-like syntax to simplify writing of methods, properties, operator overloads, and indexers of a class. Instead of…
Lambda Expressions
Lambda expressions simplify the syntax of anonymous methods. For example, the program below used an anonymous method that will be assigned to a delegate. using System; namespace AnonymousMethod { public delegate void…
Extension Methods
Extension methods are methods that add functionality to .NET types or types that you have defined. For example, you can extend the ;class by adding a Reverse method that reverses the string. The following program…