Articles from .NET 2.0

Singleton Pattern

By Michael Flanakin @ 7:17 AM :: 6349 Views :: .NET 1.x, .NET 2.0, Patterns, Proven Practices :: Digg it!

Problem: You need to provide access to one and only one instance of a specific resource.

Read on for the solution, real world example, and downloadable code...

.NET Coding Standards

By Michael Flanakin @ 12:09 PM :: 12063 Views :: .NET 1.x, .NET 2.0, Proven Practices :: Digg it!

This document outlines the minimum recommended coding standards to be followed for .NET development. These standards are a set of simple conventions that yield the following benefits:

  • Increased readability
  • Reduce maintenance effort
  • Facilitate code sharing and reusability

The standards in this paper were extracted and refined from the Microsoft Developer Network (MSDN) Coding Techniques and Programming Practices and other MSDN website resources.

Note: While I have completed the stand-alone document, I have not published it in its entirety online, yet. I will be doing that shortly, hopefully. In addition to publishing the online version, I plan on cleaning up the document and publishing it for download and use within your projects.

Read on for the rest of the article...

Latest update: Added the full Formatting Conventions and Visibility Conventions sections.

.NET Data Providers for Oracle

By Michael Flanakin @ 12:03 PM :: 4786 Views :: .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5 :: Digg it!

While working on a project that was having issues with the Oracle's data provider for .NET (ODP.NET), I found myself looking for alternatives, which led me to a hunt for supported connection string attributes. I must say that this search was harder than I originally thought it would be. Perhaps I wasn't looking for the right thing, but I figured I'd document what I found here for future use and hopefully to help someone else out. If anyone has any information on what I've gathered here, please don't hesitate to let me know. My hopes are to gather as much valid information as possible; or, if there's already a good, up-to-date resource available with this information, I'd have no problem linking to that.

Most recent update: Added connection string info for Oracle provider and details about Active Directory authentication.

Updated Jan 25, 2008

Regular Expressions for Visual Studio Code Analysis

By Michael Flanakin @ 1:30 PM :: 5261 Views :: .NET 2.0 :: Digg it!

The following is a work in progress. My hopes are to package all of this up in a Visual Studio add-in, but that will be dependent on whatever time I have available, of course.

As I've mentioned before, I'm going thru a lot of code analysis warnings and something came up that a regex find/replace would fix fairly easily. That, of course, got me thinking about how code analysis needs to have built-in refactoring capabilities. Whether or not you realize it, Visual Studio's find/replace regex is non-standard. As annoying as it is, at least I'm able to do most of what I need by going thru the online help. I'm glad I did because I now know how to do a few things I didn't think were possible, like replacement substitutions. With that in mind, here are a few of the ones I've been using to automate code analysis fixes. Before I get to that, tho, let me say that I'm no regex expert, so some of these might need further perfection. If anyone has any comments, corrections, or suggestions, I'd love to hear them!

Proceed for the regex goodness...