Author: admin

Arrays Vs Lists – Which one to use?

Both Arrays and Lists helps us to store list of elements. But which one to choose is an important design decision that is directly related...

C# File, Directory Manipulation

C# provide two versions of File, Directory manipulation options – 1) Static methods based and 2) Instance methods based. Static method based operations are provided...

MVC Architecture

MVC architecture has been in place since past 4 decades or so when GUI (Graphical Use Interfaces) started to be used widely. The idea is simple...

C# Program to find Age

Below is a C# program to find Age from a Date of Birth. Enjoy! public class Person    {        public string Name { get; set; }        public Person(DateTime birthdate)        {            BirthDate = birthdate;        }        public DateTime BirthDate { get; private set; }        public int Age{                        get { ...

Usage of params modifier in C#

Lets see how to use params modifier in C#. The perfect example is Calculator implementation. ‘params’ access modifier when used on a method argument, allows...

Constructor overloading in C#

Constructors need to be overloaded depending on what extend of data/properties need to be initialized in order to set the object to a particular state....

Using LINQ in C#

LINQ or Language Integrated Query gives the capability to query objects and C# allows two distinctive ways to achieve this – You can either use LINQ...

Using DateTime in C#

Below is very simple usage of DateTime – class DateTimePr     {         static void Main(string args)         {             var datetime = new DateTime();             var now = DateTime.Now;             var today = DateTime.Today;             Console.WriteLine(now);             Console.WriteLine(today);             Console.WriteLine(now.Hour);             Console.WriteLine(now.ToLongDateString());             Console.WriteLine(now.ToString());         }     }...

Reading a file in C#

Below is a simple program in C# that reads a file and outputs the longest word in it. Enjoy! using System; using System.IO; using System.Collections.Generic; namespace <yourNS> {     class FilesNDirs...

Finding Lowest number from a List in C#

Below is a simple program to find the lowest number from a list of numbers – using System; using System.Collections.Generic; namespace GroundCSApp {     class GetSmallest     {         public static void Main(string argvs)         {             var numlist = new List<int> { 1, 2, 3, 4, 5, 6 };...

Simple C# Programs

Here is some basic, simple, handy C# programs for you to enjoy and refresh your memory – using GroundCSApp; using System; using System.Collections.Generic; using System.Linq; namespace GroundCSApp {     public enum ShippingMethod     {...

Code Reuse via Composition in C#

Composition is a common object oriented concept that enables us to implement loose coupling as well as code-reuse. Lot of times we recommend our developers...

Constructor Inheritance in C#

Like any other Object Oriented Programming language, C# does not allow parent constructor to be automatically inherited. It need to explicitly defined in the derived...

Dynamic Typing in C#

Well, C# provides this option to prove that it is flexible. If you are too fond of dynamic typing, use scripting languages such as PHP!...

C# Generics

C# Generics are really useful when we want to reuse a class for different types and with constraints on what those types would be without...

C# Indexers

C# Indexers is a simple implementation of key/value pairs using Dictionary type. Below is a sample implementation of a telephone directory –TelephoneDirectory class using System.Collections.Generic; namespace Indexers...

C# Inheritance

We generally apply the concept of inheritance to implement a IS-A relationship. For example to implement a relationship that says an Apple is a Fruit...

C# Abstract Classes Vs Interfaces

We use abstract classes when the base class can’t have concrete implementation and that we need the derived class to fully implement it. If at...

Simple Stop Watch implementation in C#

Below is a simple stop watch implemented in C#, enjoy!StopWatch using System; namespace StopWatchApp {     public class StopWatch     {         public DateTime StarTime { get; set; }         public DateTime StopTime { get; set; }         public string ClockState { get; set; }         public void StartClock()         {             if(this.ClockState == "started")                 throw new InvalidOperationException("Invalid Operation");             this.StarTime = DateTime.Now;             this.ClockState = "started";         }...

Simple Workflow Engine Implementation in C#

Below is a simple implementation of work flow engine using interfaces and the concept of injecting overloaded class implementations via the dependent class method. The...

Building your Employee

Your Employee is your company’s pillar who keeps your company going and succeed. Their happiness, joy and right mental state is the core to your...

Using Code First first

Traditional ways of software development focus on DB-first implementation methodology. But we are in the realm of latest developments and ORM models has taken us...

Using Extension Methods in C#

Extension methods are a way to add methods to a class without changing its source code or adding it into a derived class. Creating extension methods example...

C# Events and Delegates

We use events and delegates to extend applications and to implement loose coupling. Rather than adding various method calls within an implementation and then recompiling the class,...

Using C# Delegates

  Delegates is a way to support addition of multiple features (eg: methods) to a framework without the need to recompile the core class that...

Preferred Multithreading in C# ASP.NET

Parallel execution has been one of the core techniques of programming languages that enables and stabilizes the heavy orchestrated flow of information across information management...

Software Project Size

Software Project Size is of great importance since it determines the level of management controls and the types of tools and technologies required for a...

Effort Devoted To Building Software

Studies show that more effort is devoted to software maintenance (including software enhancement, adaption to new technologies and bug fixing) than for software development activities...

Software Engineering then and now

Software Engineering is and will be the backbone and driving force behind the technological advancements that we enjoy and that will lead us to greater...

Importance Of Design Patterns

Design patterns in general helps you to implement standardized and efficient solutions to software design and programming problems. Design patterns are not pure inventions like...

C# Lambda expressions

Lambda expressions are anonymous methods that does not have access modifiers, name or a return. They are used for convenience (less code) and makes code...

Walking your life with Jesus

God gave us this life and he gave us a soul and body in his own likeness. His never ending love for his own creation...

Who is Jesus?

Who is Jesus? This is a question that is being asked by many and a question that we need to ask ourselves – Who is Jesus...

Mind of Jesus

Has anyone thought how mind of Jesus would be? Has anyone tried to know the mind of Jesus? 1 Corinthians 2:15 talks about a few...

How do we have to accept Jesus?

How many of us have tried to accept Jesus into our heart so that the fullness of God’s love and fruits of Holy Spirit reflects...

Positive Thoughts And Right Actions

Thought is the pre-process for action. We as responsible humans want fruitful actions that leads to overall betterment of the society and fellow beings. Hence...

Data warehousing – Defining data

Two kinds of definitions relevant to data warehouse design are the definition of business terms and definition of data elements. Data element definitions help the...

Data warehousing – Concept

In the present day competitive & technology centric information age, business enterprises are realising that the enterprise data is valuable resource just like other resources...

Data warehousing – Data warehousing technology

Throughout the history of systems development, the primary emphasis had been given to the operational systems (simple OLTP -Online transact ion processing systems) and the...

Data warehousing – Project Scope

A typical project scope for Data warehousing is as below – Title: APPLYING DATA WAREHOUSING The major goal & effort on working on the project is to...

Data warehousing – Need for Data warehousing

The need for an effective information management solution is of top priority in today’s changing & competitive business environment. Various Information systems like OLTP systems,...

A typical DB2 DB config

Below is a tuned DB config for a heavily loaded workflow application – [db2inst1@intranet db2inst1]$ db2 get db cfg for wf Database Configuration for Database...

Electrical Soldering

Below schematic shows electrical soldering and equipments/materials used –...

Cut Plier – Wiring man’s freind

Schematic for mighty cut plier – Cut plier in almost indispensible for any wiring work. Pliers are used for gripping or holding small objects by...

Good Old Mallet!

Schematic for a good old mallet for wiring work –...

Wiring – Bends

Below are schematic of various bends used in electrical wiring –...

Junction boxes

Below are schematic of 3 and 4 way Junction boxes mentioned in the wiring articles –...