Archives for Language features, Development Methodologies - Page 21
New interfaces for implementing Publish-Subscribe in .NET
You know you are a techie at heart if you find yourself getting excited at the introduction of a couple of new interfaces. .NET introduces IObservable (Publisher) and IObserver (Subscriber).…
ODBC 32 bit drivers on Windows 7
When I opened the ODBC control panel (on Windows 7) and started enumerating the built-in database drivers, I got a bit of a shock. Not only were the Microsoft Access…
Generating Random Numbers C#
When tasked with generating Random numbers, some folks use a static method such as that shown below: Code Snippet static Random rn = new Random(); static int ReturnNextRandom(int maxIndex) {…
VS Compilation Error -The item was specified more than once in the resources parameter
The Issue : Visual Studio throws the following compile time error on a project that includes UI controls (either WinForms or controls). The item was specified more than once…
Swapping without a temp variable
Everyone is familiar with the basic swap – using a temporary variable static void RegularSwapUsingTempVariable(ref int a, ref int b) { int temp = a; a = b; b =…
TFS Error–Source File Could Not Be Opened (‘Unspecified error ‘)
Symptom File has already been deleted (from source control and from the filesystem). Yet – the file shows up in the Visual Studio solution (with a yellow warning icon next…
Two easy ways to edit pdfs (free of cost)
I am still not sure why Adobe (the company) does not offer an online editing tool for editing pdfs. Until they offer something like this, one has to rely on…
SqlGeometry Data Type–Treating it alongside other SqlParameters
SqlGeometry is a spatial data type introduced in SQL Server 2008 (R2). It can be found in the namespace. This is a special data type and not one of the…
Unit Tests are nothing but small, controlled experiments
When I was a physicist (before I joined the computer industry), one of my favorite things was running lab ; For a physicist, a simple experiment could prove (or disprove)…
Refactoring Interfaces– separating concerns
Interfaces are the starting point for designing any service oriented architecture – whether they be externally facing web services or internally facing local services. Hence, the correct design of interfaces…