Understanding and Creating Classes in C#

Find out how classes are defined and new instances are created, how to define Properties, and how to both set values and get values for a given instance of the class. A class is a construct that enables you to create your own custom types by grouping together variables of other types, methods and events. A class is like a blueprint. It defines the data and behavior of a type. If the class is not declared as static, client code can use it by creating objects or instances which are assigned to a variable.

Abstract Class in C# Explained

Abstract class provides a common definition of a base class that many derived classes can share.

The abstract keyword enables you to create classes and class members that are incomplete and must be implemented in a derived class.


  • An abstract class cannot be instantiated.
  • Derived classes of the abstract class must implement all abstract methods


Abstract class can be declared in C# using the keyword abstract as shown in the example below:


How to get the Application Directory Path in the Installer Class?

I had to create a Setup Project  to be able to deploy the our .Net Application to the SIT environment.  Had to decide between the Default Installer that comes with Visual Studio and the Install Shield Limited Edition, which also comes free with Visual Studio 2010. Personally I think Install Shield is better than the default Windows Setup Project that comes with Visual Studio, but for some reason I had to choose the Visual Studio Setup project .

.Net C# Logging and Tracing Tools

If you develop in .Net using C# and wondered if you can have a tool which will help you in logging, here is a list of tools available. Having a good logging for your application will help you to avoid many headaches. It will help you to troubleshoot when things go wrong. Here are some Logging Tool for C#. Hope you find it useful.


How to check if a String is null or Empty in C#

Checking a String value to see if it is Empty or null is something you will come across a lot during your day to day work using C#. There are different ways to doing this check in C#. Basically there are different ways you can do this. String is a reference type so you can check if it is null. Also you can check for an empty string (“”) or check the length of the string and see if it is zero.

How to Check null in C# (C Sharp)