C# Properties

Properties in C# are known as the members of a class that can be used to set and get the data from a data field of a class. Properties are not particularly used to store data in C#, they are just like an interface to transfer the data. Properties are defined as the named members … Read more

C# Generics

Generics in C# allows defining the specification of the data type of programming elements in a class or a method until it is actually used in the program. Specification for the class or method can be written with substitute parameters for the data type. Following are some important features of Generic: Generics in C# helps to … Read more

C# Reflection

Reflection objects in C# are mainly used to obtain type information at runtime in the system. These classes which allow access to metadata of any running program are meant to be in the System.Reflection namespaces. We can also say that Reflection is capable to get the type of information that describes different modules, parameters, and … Read more

C# Delegates

C# Delegates are the reference type variables that hold the reference to a method. Delegates are similar to pointers to functions, in C or C++. The reference given to delegates can be changed at runtime. All delegates are implicitly derived from the System.Delegate class. They are used for implementing events and call-back methods. Declaring Delegates in C# … Read more

C# Unsafe Code

Unsafe code in C# can also be defined as Unverifiable code. These unsafe codes can be run outside the control of the Common Language Runtime (CLR) of the .NET frameworks. The “unsafe” keyword is used to tell the compiler that the control of this particular code will be done by the programmer. In an unsafe context, code uses pointers, … Read more

C# Regular Expressions

C# Regular Expressions are used to do the pattern matching in C#. For this purpose regex classes are being used. Regular Expression is a pattern that is used to interpret and check whether the given input text is matching with the given pattern or not.  While writing the syntax of regular expressions there are many … Read more

C# Exception Handling

C# Exception handling is defined as the way to tell the program to move on to the next block of code or provide the defined result in certain situations. An exception is considered as the problem that arises during the execution of a program. It occurs when an exceptional situation happens in the program. In C# … Read more

Categories C#

C# Preprocessor Directives

C# Preprocessor directives are known as the set which gives instruction to the compiler to preprocess the information before actual compilation starts. In C# all Preprocessor Directives start with #. These commands specifies which sections of the code to compile or how to handle specific errors and warnings. The preprocessor directives are used to help … Read more

Categories C#

C# Attributes

C# Attributes are very useful in a programming language. In C# attributes are used to bring metadata about various code elements which include methods, properties, and types. They can be placed on certain entities in the source code to specify additional information. To add attributes in the code ([ ]) are used at the top … Read more

Categories C#

C# Events

An event is a mechanism for communication between objects. When something happens such as a key press or an error, an event can notify other objects about it. C# Events are used for inter-process communication. Events are known as the user actions such as mouse movements, keypress, and clicks, etc. In C# applications have to … Read more

Categories C#