Archives for Language features, Development Methodologies - Page 23
Detaching, Dropping SQL Server Databases–Some gotchas
There’s a couple of different ways to drop/detach databases from sql server (assuming the obvious Right Click, Delete option in Management Studio did not work for you) Method 1 -…
Property Bags–A Life Saver for the practicing OO Developer
(Full Source Code Available at the end of this article) The basic idea is simple enough – you have a type (class) with certain properties that is being used by…
Reusing an old email to target a group of email recipients
When you have a large list of email recipients that you need to send the same email to, it is often convenient to dig through a previous email (could be…
sa user unable to attach detach databases
PROBLEM With a new SQLServer install, if you selected Mixed Mode authentication, chances are you want to be able to use your sa user to connect to the database. You…
Abstract Factory in C# – Equally useful for manufacturing operations (services) and products
This article assumes some familiarity with the Factory pattern. The factory concept is equally useful for creating products (ProductFactory) or for creating services (ServiceFactory). A good way to start is…
Abstract Methods versus Virtual Methods
Both (abstract methods and virtual methods) offer similar functionality – when should you use virtual methods and when should you use abstract methods? Base Functionality Driven If you want a…
Large Method Signatures (too many arguments)
The Problem A recent project of mine had me looking at C# code which had been brought over from old C/C++ code. One of the first things that struck me…
Static qualifier at a class level versus member level (in C#)
The static qualifier is available at both the class level as well as the individual member level (both fields and methods) in C#. This article discusses when to use it…
Delegates in C# – pre-lambda and post-lambda expressions
Delegates are amongst the most powerful constructs in the C# language (Full Solution Download at the end of this article). Some uses of delegates in c# include : Delaying invocation(calling)…
The Under-Appreciated Hash Function–Illustrated using a Birthday Lookup
Overview Arrays are superfast. Simply becasue the exact location (index) of the element is provided. What if we could tie that index to the actual value of the data being…