Code contracts (Part 2): Creating my first project with code contracts

I downloaded code contracts from here. After installing code contract, I tried to create my first project with code contracts. I created new console project name CodeContractTest . I added reference to Microsoft.Contracts library which is appeared in .Net references after installation. I wrote following code this is clearly compiled without any warning. [Read More]
Tags: Contracts

Visual Studio trick: Adding namespace

A few days ago I saw a clip of PDC 2008 about MVC .Net which is great concept. It was performed by Phil Haack. In this video Phil shows a trick of Visual studio which is very useful. Most of the time during application development you want use a class which its name space has not been included. Guess what should you do? Oh yes ! You should type name space completely or leave current line and go to top of class adding appropriate "using" statement get back to your line of code. Surprisingly there is a trick in visual... [Read More]
Tags: VS 2008

Hosting WCF Service in IIS and Configuration may be needed

This article is an attempt to depict steps may needed to configure IIS for hosting WCF application. An important thing that should be considered  is that all user do not face following situations. First of all I try to create a simple WCF application and then I try to publish this simple WCF simple application. In order to create a WCF application we just need to know ABC of WCF application which are Address, Binding and Contract. (You can download code from [here](https://localhost/be/admin/Pages/resources/WCFConfigIIS/ First of all I created a blank solution with Visual Studio 2008 by clicking File > New... [Read More]

Code contracts (Part 1): Introduction

During developing applications we have always use unwritten rule in programming or if it is written in design documents user should consider them in development. For example if developer wants to call a method which has an integer parameter and this parameter is used as an index of array he should be aware calling that method with negative value or greater than array lenght. Calling method with negative value causes runtime error. There are lots of contracts that a developer should consider during development. Recently I came across new concept (However it is in research phase) named CodeContracts which is... [Read More]