Use of Action (Function programming) for better code health

One of my friend Kritul Rathod had gave his understanding of Action keyword in C#. Passing the functions as parameters helps in many ways, here are basic ones It helps separate the coding logic (for some trivial things like exception handing, type conversions, Verbose Logging, etc – the things that clutters the code) from the actual… Continue reading Use of Action (Function programming) for better code health

StyleCop : Global Rule Suppression

We want to suppress rules of style cop for all the projects in the developer machine. As you can get few information from the documentation both on global rule setting and rule suppression. Below mentioned are 2 ways to merge them both: Editing the Settings.StyleCop in notepad Go to the installation location of StyleCop (possible location:… Continue reading StyleCop : Global Rule Suppression

Published
Categorized as Technical

Step by Step implement StyleCop custom rules with Visual Studio – Part 2

This is Part 2 of 2 Part series on implementing custom StyleCop rules. Please read Part 1 here, if you haven’t already read. Now download the code of creating the custom rules from here. Make sure you perform following steps to build it, in case you are unable to build: Installation location of StyleCop will… Continue reading Step by Step implement StyleCop custom rules with Visual Studio – Part 2

Published
Categorized as Technical

Step by Step implement StyleCop custom rules with Visual Studio – Part 1

Instead of starting with an introduction of StyleCop, I would like you to read “Why should we use StyleCop?“. There is enough help on how to integrate StyleCop with Visual Studio, one can be found here. This article is focused on step by step implementation to add custom rules that we used in our project. Install… Continue reading Step by Step implement StyleCop custom rules with Visual Studio – Part 1

Published
Categorized as Technical

Know your version of Web Application

Once the web application is published to production, after a while it becomes difficult to know exactly which version is in production. One of the way to find it without any ambiguity is to flash the version number on the footer tag next to copyright text. Code in aspx page Code in Codebehind page

Published
Categorized as Technical

Another Coding rules!

During some learning I came across 10 rules here with corresponding How-To #10 Avoid regions :: Refactor into smaller methods #9  Use Exceptions For Errors :: Only for errors not for execution branching #8  Avoid Boolean Parameters :: Create local Properties instead or using 2 different methods one for true and one for false. #7  Avoid Too Many Parameters :: Refactor to Create… Continue reading Another Coding rules!