C# Corner

Resources  
  • Regular Expressions Usage in C#Sep 07, 2001. The source code shows how to use Regular Expressions in C#.
  • Factory Patterns in C#Dec 10, 2001. The FACTORY METHOD PATTERN comes under the classification of Creational Patterns. The creational patterns deals with the best way to create objects.
  • Abstract Factory Patterns in C#Dec 10, 2001. The ABSTRACT FACTORY PATTERN comes under the classification of Creational Patterns. The Abstract Factory provides an interface to create and return one of several families of related objects.
  • Observer and .NET event delegatesDec 17, 2001. The purpose of this article is to try to introduce observer pattern and compare it to .NET event delegate handling of notifications.
  • Builder Patterns in C#Dec 20, 2001. Builder is an object creational design pattern that codifies the construction process outside of the actual steps that carries out the construction - thus allowing the construction process itself to be reused.
  • Prototype Patterns in C#Dec 26, 2001. The PROTOTYPE PATTERN comes under the classification of Creational Patterns. The creational patterns deals with the best way to create objects. This helps to copy or clone the existing objects to create new ones rather than creating from the scratch.
  • Adapter Pattern in C#Jan 03, 2002. The Gang Of Four (GoF) defined the Adaptor pattern as follows in their most famous book "Design Patterns" Gamma et al. Adapter lets classes work together that couldn't otherwise because of incompatible interfaces."
  • Basic FTP in C#Jan 10, 2002. FTP client developed using Windows Forms. The source code uses a rigid Model-View-Controller design pattern.
  • Bridge Patterns in C# Jan 17, 2002. Bridge Pattern is commonly known as Handle/Body idiom in C++ community. This pattern is used for decoupling an abstraction from its implementation so that the two can vary independently.
  • Composite Patterns in C#Jan 23, 2002. A Composite is a tree structure consisting of individual objects mixed with compositions of objects, that is, objects that have other objects as their children.
  • Creational Pattern - Abstract FactoryFeb 11, 2002. An abstract factory provides an interface for creating families of related objects without specifying their concrete classes. Sometimes one wants to construct an instance of one of a suite of classes, deciding between the classes at the time of instantiation.
  • N-Tier Development with Microsoft .NET : Part IFeb 15, 2002. The purpose of this article is to examine a proof of concept on an architecture that follows the DNA pattern on concept only.
  • Creational Pattern - BuilderFeb 19, 2002. The Builder pattern allows a client object to construct a complex object by specifying only its type and content. The client is shielded from the details of the objects construction.
  • Command Patterns in C#Mar 04, 2002. Command pattern encapsulates a request as an object and gives it a known public interface. Command Pattern ensures that every object receives its own commands and provides a decoupling between sender and receiver.
  • Prototype PatternMar 22, 2002. The Prototype pattern is used when creating an instance of a class is very time-consuming or complex in some way.
  • A Generic Data Access Component using Factory PatternJul 24, 2002. This article shows to utilize the System.Activator class and a factory pattern to create the concrete provider classes.
  • A Generic Data Access Component using Factory PatternJul 24, 2002. Another way to solve this problem is to utilize the System.Activator class and a factory pattern to create the concrete provider classes as was pointed-out in Dan Fox's article "Design an Effective Data-Access Architecture" (.netmagazine, vol. 2, no. 7).
  • A Generic Data Access Component using Factory PatternJul 30, 2002. the article A Generic Data Access Component using Factory Pattern provides a very good way of creating ADO.Net data provider independent applications, but there is one problem with it. Different ADO.Net data providers use different approaches in labeling of parameters in SQL statement.
  • Singleton Patterns in C# RevisedDec 16, 2002. I am coming from the Java world, where synchronizing the Singleton creation is common practice.
  • Abstract Factory - Creational Design PatternJan 03, 2003. Abstract Factory simplifies the creation of different families of related or dependent objects. It provides interfaces for this purpose and does not specify the concrete classes.
  • Implementing Design Patterns in C# - Singleton PatternJan 23, 2003. There are times, when one need to have a class which can be only instantiated once. Singleton Design Pattern addresses to such situation by providing a design for such classes (known as Singleton class).
  • Implementing MVC Design Pattern in .NETFeb 25, 2003. This article explains the basic concept of the Model View Controller (MVC) design pattern and also shows how how closely .NET Framework can be used to implement the MVC design pattern with the one that originally conceived.
  • Possible Usage of Visitor and Type CastsFeb 25, 2003. In this article I will try to introduce Visitor pattern and one possible variation on it. It treats problems related to projects projects where high level of adaptability is needed.
  • Degenerated Observer and Asynchronous Web ServicesMar 20, 2003. In this article I will revisit Observer pattern and try to show how it can be modified and used to make web services to dispatch and receive notifications.
  • Understanding SQL Server Yukon Service BrokerFeb 25, 2004. The new version of Microsoft SQL Server™ "Yukon" comes together with a set of technologies capable of enlarging the horizon for database applications. One of the most remarkable technologies is the Service Broker that makes it possible to build database-intensive distributed applications. In this article we explore the core concepts of the Service Broker and show how to use its potentialities to build applications with message interchanging.
  • A Chess Program using C#Nov 29, 2004. This is a chess program, made using C#. It has used object oriented concepts and design patterns like Flyweight, Factory and Decorator. Two player can play this game and it has facility to drag-drop pieces. It also shows potential positions of each pieces which is useful for learning.
  • Creational Patterns - SingletonMay 31, 2005. This article discusses the implementation of the Singleton Design Pattern.
  • Microsoft patterns & practices: The Enterprise LibraryJul 06, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform.The following article covers details on the Data Access Application Block.
  • Microsoft patterns & practices: The Enterprise LibraryJul 12, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform.The following article covers details on the Data Access Application Block.
  • Enterprise Library Caching Application BlockJul 12, 2005. Microsoft patterns & practices provide scenario-specific recommendations illustrating how to design, develop, deploy, and operate architecturally sound applications for the Microsoft .NET platform. The following article covers details on the Caching Application Block.
  • Design Patterns Part - IAug 26, 2005. Design patterns are about design and interaction of objects, as well as providing a communication platform concerning elegant, reusable solutions to commonly encountered programming challenges.
  • Design Patterns (Strategy Pattern) Part - IIAug 31, 2005. Define a family of algorithms, encapsulate each one, and make them interchangeable. Strategy lets the algorithm vary independently from clients that use it.
  • Design Patterns in C#Nov 01, 2005. To define design patterns in simple words they are "popular solutions for common design problems". They are very helpful in designing architecture and they also increase ease of communication among the developers.
  • Introduction to Model View Control (MVC) Pattern using C#Dec 12, 2005. The benefits of using the Model-View-Control (MVC) pattern in our development projects is that we can completely decouple our business and presentation application layers. Furthermore, we will have a completely independent object to control the presentation layer.
  • C# using the Proxy Pattern to Define RelationshipsJan 23, 2006. I was recently working on a 2.0 Framework project where we had many types of related objects. However, we needed to ensure that there were not multiple instances of the same object in memory. Usually the GOF Proxy pattern is used to hide or control access to an object, but we can also use it to define relationships between objects.
  • Understanding C# Events: What They Are and Where They Came FromJan 30, 2006. To help you get a working knowledge of C# events and event handling, this article explains where events come from, what they really are at a functional level and how they are expressed in C#. This article specifically looks at the Gang Of Four (GOF) Observer pattern.
  • C# Heap(ing) Vs Stack(ing) in .NET: Part IVJan 30, 2006. Having a basic understanding of how memory management works will help explain the behavior of the variables we work with in every program we write. In this article we’ll look further into Garbage Collection (GC) and some ways to keep our applications running efficiently by using static class members.
  • Wrapper Patterns in C#: Part IFeb 13, 2006. Did you ever wish for a superhuman power to be impervious to bullets or travel outside your body? How about the superpower to be able to breathe underwater or fly? Or how about a changing the way you look so you can disguise yourself as anyone, or anything? In this series of four articles, we will travel down the C# wrapper rabbit hole and see how it is all possible with some patterns: Proxy, Decorator, and Adapter.
  • Wrapper Patterns in C#, Part II: The Proxy PatternFeb 14, 2006. Did you ever wish for a superhuman power to be impervious to bullets or travel outside your body? How about the superpower to be able to breathe underwater or fly? Or how about a changing the way you look so you can disguise yourself as anyone, or anything? In this series of four articles, we will travel down the C# wrapper rabbit hole and see how it is all possible with some patterns: Proxy, Decorator, and Adapter.
  • Wrapper Patterns in C#, Part III: The Decorator PatternFeb 15, 2006. Did you ever wish for a superhuman power to be impervious to bullets or travel outside your body? How about the superpower to be able to breathe underwater or fly? Or how about a changing the way you look so you can disguise yourself as anyone, or anything? In this series of four articles, we will travel down the C# rabbit hole and see how it is all possible with some wrapper patterns: Proxy, Decorator, and Adapter.
  • Wrapper Patterns in C#, Part IV: The Adapter PatternFeb 16, 2006. In this series of four articles, we will travel down the C# rabbit hole and see how it is all possible with some wrapper patterns: Proxy, Decorator, and Adapter.
  • Abstract Factory Design Pattern in ADO.NET 2.0Feb 17, 2006. This article will discuss the Abstract Factory Design Pattern and its real-world applications in .Net Framework 2.0.
  • Simple Factory Pattern Side by Side with Abstract PatternMar 02, 2006. This article will discuss the Simple Factory Pattern and how to use it with Abstract Factory Patter discussed in the previous article.
  • Data Access Component and the Factory Design PatternApr 05, 2006. A generic Data Access Component implementation written in C# that supports SQL, Oracle, OLEDB and ODBC data providers. Using the Factory design pattern for instantiating the data provider correct and specific objects determined at run time.
  • Data mining and SQL Server 2005Apr 11, 2006. Data mining is a key member in the Business Intelligence (BI) product family in SQL Server 2005 . Data mining is about analyzing data and finding hidden patterns using automatic or semiautomatic means, which can be explored for valuable information. It is about learning the characteristics of data set, which are not possible to discover by simple seeing.
  • Prototype Design Pattern: Easy and Powerful way to copy objectsMay 05, 2006. This article mainly focuses on the Prototype design pattern along with advantages and possible practical scenarios where this pattern seems to be the best choice.
  • An Elegant C# Data Access Layer using the Template Pattern and GenericsMay 22, 2006. The GOF Template pattern coupled with .NET 2.0 Framework generics provides an awesome synergistic alliance. This article demonstrates how to drastically reduce the amount of code required in building a data access layer. Less code to debug... less code to break... less code to maintain... what could be better?
  • Singleton PatternJul 11, 2006. The singleton design pattern is designed to restrict instantiation of a class to one (or a few) objects. This article talks about building .NET applications using singleton pattern.
  • Iterator Design PatternJul 11, 2006. This article, explains how to use the Iterator pattern to manipulate any collection of objects. To explain this I am using two interfaces IEnumerator and IEnumerables.
  • The GOF Abstract Factory Design Pattern In C#Aug 04, 2006. This article covers the basics of the GOF Abstract Factory design pattern by looking at building Model T automobiles.
  • Introduction to the GOF Strategy Pattern in C#Aug 08, 2006. For this article, we’ll be building an exciting calculation engine that does remarkable things like adding, subtracting, multiplying and dividing through implementation of the strategy pattern.
  • The .NET 2.0 Framework Provider PatternAug 11, 2006. The Provider Model Design Pattern was first introduced with the .NET 1.1 framework, specifically in the ASP.NET starter kits and was formalized in ASP.NET Whidbey as a membership management provider API (Application Program Interface). It's primary purpose is to separate the definition for an API from the implementation. This keeps the API flexible by enabling the core functionality to be flexible and easily changed.
  • Multithreading Made Easy in .NET 2.0Aug 31, 2006. This article demonstrates a very easy alternative to normal multithreaded programming in .NET. A freely available library called CSP.NET is presented and a sample application shown.
  • Practical Approach to Computer System Design and ArchitectureOct 13, 2006. The article gives an introduction to system designing and architecture by introducing a new concept that allow beginners to easily break and design complex software systems using a modular based development approach with a pattern, which we all practice in our day to day life.
  • Database Provider-based ASP.NET Membership ProviderOct 18, 2006. This article is intended to explore the provider pattern in the context of a membership provider.
  • The Difference Between the Two GOF Patterns "Strategy" and "State"Jan 18, 2007. The GOF Strategy and State patterns are remarkably similiar and it is really only a minor implementation detail that distinguishes the two.
  • The GOF "Chain of Responsibility" Design PatternJan 18, 2007. The Chain of Responsibility pattern is used to pass responsibility for handling a call to another class. This article gives a basic overview of the pattern.
  • Regular Expression Usage in .Net EnvironmentApr 19, 2007. This article describes how to use regular expression in .Net.
  • A Strategy for Using Delegates in C#Jun 15, 2007. In a recent article comment I was asked for a sample of how to use a delegate and so I wanted to put together a sample of how we can use delegates in order to implement a strategy pattern in a way that requires much less code that is easier to maintain than when approaching the same solution deriving sub classes using an OOP implementation.
  • Object Instantiation in C#. Part II Factory MethodsJun 24, 2007. There are many ways to approach object instantiation. In this article we’ll cover a few of the patterns used to instantiate objects.
  • C# Object Instantiation: Part I. ConstructorsJun 24, 2007. There are many ways to approach object instantiation. In this article we'll cover a few of the patterns used to instantiate objects.
  • Object Instantiation in C#. Part III Abstract FactoriesJun 25, 2007. There are many ways to approach object instantiation. In this article we’ll cover a few of the patterns used to instantiate objects.
  • Object Instantiation in C# Part IV The Builder PatternJun 27, 2007. There are many ways to approach object instantiation. In this article we’ll cover a few of the patterns used to instantiate objects.
  • Object Instantiation in C#. Part V Just Don't Do ItJun 29, 2007. There are many ways to approach object instantiation. In this article we'll cover a few of the patterns used to instantiate objects.
  • Chain of ResponsiblityAug 30, 2007. This article shows a how to make a custom Wizard control using Chain of Responsibility Pattern which passes and returns data between each step. This sample creates a wizard control through windows form.
  • Introduction to Building a Plug-In Architecture Using C#Sep 10, 2007. In this article we'll take another look at how we can use the state pattern to build a plug-in architecture that will allow us to change the behavior of our application by placing differnt plug-ins into a folder.
  • Creation of objects using Late-Binding techniqueSep 10, 2007. This article will explain how we can create objects in runtime, using late binding technique. Especially for a situation where you will come to know the class name only in runtime.
  • Lengthy Operation Windows Form PatternsJan 03, 2008. This article gives a description to lengthy operation pattern on windows forms.
  • Implementing the Passive View -- a Derivative of the Model-View-Control Jan 27, 2008. This article demonstrates an implementation of the "Passive View Pattern" (based on the "Model View Control Pattern") for windows user controls.
  • Writing Better Code; Keeping it MaintainableMar 01, 2008. This article provides guidance for writing better, more maintainable code.
  • Writing Testable ObjectsApr 18, 2008. This article is an introduction to a simple pattern for building more testable classes.
  • Save the application settings for subsequents sessionsApr 19, 2008. It is very important to save the application settings established by the user in the current session, in order to avoid the application pattern establishment for each time a new session is opened.
  • Understanding Pattern Matching in F#Apr 30, 2008. F# introduces a code structure called pattern matching which allows you to perform some pretty interesting tasks in the language. This article will get you up to speed with this powerful technique in programming.
  • Coding Pattern for Enabling ControlsJul 16, 2008. Writing code to enable the controls in your application at the correct times can be difficult and error prone. This article describes a reliable way to code your control enabling.
  • Software Design Guidelines for .NETSep 02, 2008. Through this article I will attempt to break down this fire breathing dragon. And hopefully at the end of it, you would feel confident of riding this dragon towards glory and respect.
  • Factory Method Design Pattern using C#Oct 27, 2008. The factory method pattern is a creational design pattern used in software development to encapsulate the process of creating the objects.
  • Design Pattern Interview Question Part 1Nov 04, 2008. This article talks about factory, abstract factory, prototype pattern from interview point of view.
  • Design pattern -Inversion of control and Dependency injectionNov 04, 2008. In this section we will discuss about how IOC and DI can help us build loosely coupled software architecture.
  • Software Architecture Interview Questions Part 2 ( Design pattern )Nov 06, 2008. In this article we will cover Interpreter pattern,iterator pattern,mediator pattern,memento pattern,observer pattern from Interview perspective.
  • Web Application ArchitectureNov 09, 2008. This article is about web application architecture. In this article you see how to separate each layer and why it's necessary for good application architecture. Also a small introduction to the Spring Framework and ORM can be found in this article.
  • The quest for the Generic Singleton in C#Nov 17, 2008. While it is a bit tricky to implement the Singleton pattern in C#, the steps necessary are well known. There has however been debate about a generic solution for this. This paper provides 3 possible solutions for the generic singleton, and makes a brief comparison.
  • Data Binding Techniques Using Visual Studio.NET and JDeveloperDec 08, 2008. Today data binding techniques are very easy to apply using IDE such as Microsoft Visual Studio.NET and Oralce JDeveloper. In this article, I will show how to develop a client/server enterprise application by applying the Model-View-Controller (MVC) design pattern and using development tools such as Microsoft Visual.NET and Oracle JDeveloper.
  • Model View Presenter (MVP)Dec 31, 2008. In this article we will understand MVP, execute a sample project with MVP, implement the same using windows UI and then finally we will discuss about the differences between MVP and MVC.
  • Inversion of ControlJan 05, 2009. This article is explaning about Depenedncy Injection or Inversion of Control. It is explaning with examples in C#.
  • UI Object Connector Implementation of Mediator Pattern Jan 30, 2009. When we consume business objects in UI, the logic can become pretty complex for activities like setting the business object value, getting the object value and setting the user interface from the object value. We can minimize the complexity of UI interaction with the business object using mediator pattern.
  • Introduction to Parametric Singleton PatternFeb 11, 2009. This article explains about Parametric Singleton Pattern.
  • Introduction to Memorization PatternFeb 13, 2009. This article explains about implementation of Memorization Pattern in C#.
  • Interfaces + Factory pattern = Decoupled architectureFeb 13, 2009. In this tutorial we will try to understand how we can use interfaces and factory pattern to create a truly decoupled architecture framework. In this sample we will take up a simple three tier architecture and apply interfaces and factory pattern to see how we can transform the three tier in to a truly decoupled architecture.
  • Introduction to Memento PatternFeb 24, 2009. This article explains about Memento Pattern and its Implementation in C#
  • Introduction to Template Method PatternFeb 27, 2009. This article explains about Template Method Pattern in C#
  • MVP (Model View Presenter) – Supervising Controller.Apr 12, 2009. This articles discusses a general implementation of the Supervising Controller MVP (Model View Presenter) pattern for a win-forms application and the use of a dialog broker to allow pulling additional logic into the controller class.
  • Master-detail data-binding using DropDownList in ASP.NET 2.0Apr 17, 2009. This article is intended to illustrate how to implement the master-detail presentation pattern using the ObjectDataSource components and DropDownList Web control.
  • Master-detail data-binding using DropDownList in ASP.NET 2.0Apr 28, 2009. This article is intended to illustrate how to implement the master-detail presentation pattern using the ObjectDataSource components and DropDownList Web control.
  • Master-detail data-binding using two Web pages in ASP.NET 2.0Apr 29, 2009. This article is intended to illustrate how to implement the master-detail presentation pattern using the ObjectDataSource components and two Web pages in ASP.NET 2.0. Master-detail presentation pattern is one of the techniques most used in enterprise applications intended to visualize one-to-many relationships, for example, let’s suppose the following a common business scenario where we want to display a list of subcategories of products, and allow the user select a particular subcategory in order to display the list of associated products.
  • UNITY FrameworkMay 04, 2009. This article will explain how to use UNITY Framewrok to achieve DI and IOC design pattern.
  • Model View Presenter (MVP) design pattern and data bindingJun 03, 2009. Model View Presenter (MVP) design pattern is the evolution of the MVC design pattern and it’s aimed at providing a cleaner separation of concerns between the view, the model, and the controller improving the architecture (you can use several UI technologies without recompiling the business logic components) and testability of the enterprise solution. The pattern was originally developed at Taligent in the 1990s. In this article, I will explain the principles and how to use the MVP design pattern along with data binding with an example using C# language in Microsoft.NET.
  • Singleton Design Patterns in C#Jun 08, 2009. Whenever we want that a class has only one instance and it should have global point to access it but allowing the flexibility to create more objects if the situation changes,in that case we will use Singleton Design Pattern.
  • MVC Declarative BindingJun 08, 2009. One of the things that makes the bar to implement any “MVC-ish” pattern high is the tremendous amount of plumbing required just to get started in order for the different entities to communicate state changes. This article introduces a utility library that can be used to declaratively bind the model and view encapsulating all the wiring required and making implementation much easier.
  • Singleton PatternJun 09, 2009. In this article we will implement Singleton pattern to maintain global variables in Winform application.
  • Implementing MVVM Pattern In Silverlight 3Jul 22, 2009. This article shows how to implement MVVM Pattern in Silverlight 3.

About Observer-Pattern

NA
File APIs for .NET
Aspose are the market leader of .NET APIs for file business formats – natively work with DOCX, XLSX, PPT, PDF, MSG, MPP, images formats and many more!
Download Free eBooks