You are on page 1of 9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

In Focus

Umakanth

Ask a Question

ARTICLE

Contribute

READER LEVEL:

C#CodeReviewAndBestSuggestedReview
Guidelines
By Bhuvanesh Mohankumar on May 12, 2016
In this article you will learn about C# Code Review and best suggested Review
Guidelines.

7.8 k

19

Register: C# Corner Hyderabad DevCon16


Introduction:
This article helps you to know about the best suggested code review for the C# language code.
When we deliver code the quality of code matters a lot. Best reviewed code will improve
optimization and quality on security aspects of code.
What are the benets of Code review?
It helps a lot in nding bugs in the early stage, when they are cheap to x. Code review also helps
to maintain the code's standards compliance. It also helps to uphold consistent coding style
across the company and teaching and sharing knowledge. During review team members gain
better understanding of the code base and learn from each other.
http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

1/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

Code review has a large impact on consistent design and implementation. Peer review helps to
maintain a level of consistency in software design and implementation.It helps to have a higher
software security. Applications that require a high level of security benet from targeted security
reviews.It is also built on team cohesion. Review discussions save team members from isolation
and bring them closer to each other.
Code review gives the condence of stakeholders. You build condence of stakeholders about
the technical quality of the execution.

Source: javacodegeeks.com

C# Corner Cloud and IoT Developer Conference Announced

Types of code reviews:

TECHNOLOGIES
ANSWERStypes
BLOGS
VIDEOSreviews
INTERVIEWS
BOOKS NEWS
CHAPTERS
CAREER below,
JOBS CODE
There
are
basically three
of Code
recommended
and nd
the details

IDEAS C#CornerSearch

Peer review:
When one of your team members reviews the code to ensure that the code follows the coding
standards and meets requirements.
http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

2/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

Peer level of review can include some unit testing also. Every le in the project must go through
this process.

Source: biomedcentral.com
Architect Review:
The Technical Architect of the team must review the core modules of the project to ensure that
they adhere to the design and there are no major mistakes that can aect the project in the long
run.
It is a kind of approval from the architect to check that the code has met the design
requirements.

http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

3/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

Group Review:
This is a normally used review type where you randomly select one or more les and conduct a
group review once a week.
It is always strongly recommended to distribute a printed copy of the les to all team members
15 minutes before the meeting. All of them can read and come up with points for discussion. In
the group review meeting, use a projector to display the le content in the screen. Go through
every section of the code and let every member give their suggestions on how could that piece
of code could be written in a better way.
Best Suggested Review Guidelines:
I have explained the review guidelines that are mostly recommended in the software
development process.
1. Always check for 'null', this needs to be performed wherever applicable to avoid the Null
Reference Exception at runtime.
2. Check for the proper implementation of Exception Handling using the try, catch and nally
blocks of code.
3. Make sure the logging of exceptions and also proper ow of application is also logged [if
necessary] for better error xing in future.
4. Check that the developer has tested his codes along with the test cases by performing unit
test to make sure that basic level of testing is done.
5. Check that developer has reduced using nested if conditions as much as possible for better
code functionality use switch cases wherever required.
6. Conrm that the regular for loop are replaced with by using LINQ queries and Lambda
expressions to improve Readability.
http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

4/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

7. Check that the class are marked as sealed or static or abstract as per its usage and your
need.
8. It is always recommended to hand write the code even though if you are referring to the
code from some sources, always its strongly recommended to avoid copy paste of code
from other resources.
9. In the Code analysis Rules and guidelines of Microsoft it is suggested to avoid using the
'out' and 'ref' keywords in the application as much as possible.
10. Check the developer has used "Stringbuilder" instead of "string", if multiple concatenations
are required in order to save heap memory.
Download 100% FREE Spire Oce APIs

Bhuvanesh Mohankumar
I am a Lead Technical programmer working in Microsoft Technologies not limited to
ASP.Net, MVC, SQL, AngularJS, Azure and social networking like Facebook, LinkedIn,
Google analytic.Specialties:Team Work, Coordinating, Bu... Read more
http://www.c-sharpcorner.com/members/bhuvanesh-mohankumar

155

Rank

296.1k
Read

Gold

Member

RELATED ARTICLES
What's New in Review Tab in Word 2013
Best Practices For Code Review
Increase Your Code Review Eciency With

Managed Static Code Analysis in VSTS: Part I


Samsung Galaxy Note Review
Code Review Checklist and Guidelines for C#

http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

5/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

Visual Studio Code Metrics

C#

C# Code Review

Code Review

Developers

Guidelines

View Previous Comments >>

COMMENTS

10 of 19

Good one
Sonu Chaudhary
377 541 49.7k

May 12, 2016

Post Reply

Good one
Nitin Tyagi
152 1.6k 76.7k

May 12, 2016

Post Reply

Nice share
Bhavik Patel
551 223 43.6k

May 12, 2016

Post Reply

Nice Article
Rambabu Chintapanti
757 4 0

May 13, 2016

Post Reply

Nice
Vignesh Mani
118 1.9k 60.7k

May 13, 2016

Post Reply

Thanks Sonu Chaudhary


Bhuvanesh Mohankumar
155 1.8k 296.1k

http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

May 14, 2016

Post Reply

6/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

Thanks Nitin Tyagi


Bhuvanesh Mohankumar
155 1.8k 296.1k

May 14, 2016

Post Reply

Thanks Bhavik Patel


Bhuvanesh Mohankumar
155 1.8k 296.1k

May 14, 2016

Post Reply

Thanks Rambabu Chintapanti


Bhuvanesh Mohankumar
155 1.8k 296.1k

May 14, 2016

Post Reply

Thanks Vignesh Mani


Bhuvanesh Mohankumar
155 1.8k 296.1k

May 14, 2016

Post Reply

Type your comment here and press Enter Key....

Follow Comments

COMMENT USING
0Comments

Sortby Oldest

Addacomment...

FacebookCommentsPlugin

SPONSORED BY
http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

7/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

TRENDING UP

01

50 Important Queries In SQL Server

02

C#: Best Coding Guidelines - Part


One

03

Visual Studio 2015 Tips And Tricks

04

How To Optimize SQL Queries

05

Most Popular Programming


Language Of 2016

06

Voice of a Developer: JavaScript


ECMAScript 6 - Part Eighteen

07

SharePoint 2016 New Features

08

Has JSON Overtaken XML

09

Active Directory Conguration &


Creating A New Domain User In DNS
(Windows Server 2012 R2)

10

New features of C# 7.0


View All

Follow@csharpcorner

http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

61.3Kfollowers

8/9

18/05/2016

C#CodeReviewAndBestSuggestedReviewGuidelines

C#Corner
198,523likes

LikePage

BookNow

1friendlikesthis

MVPs

MOST VIEWED

LEGENDS

NOW

PRIZES

REVIEWS

SURVEY

CERTIFICATIONS

DOWNLOADS

Hosted By CBeyond Cloud Services

ABOUT US
CONTACT US

FAQ

MEDIA KIT

PRIVACY POLICY

MEMBERS

TERMS & CONDITIONS

STUDENTS

LINKS

SITEMAP

REPORT A BUG

2016 C# Corner. All contents are copyright of their authors.

http://www.csharpcorner.com/article/CSharpcodereviewandbestsuggestedreviewguidelines/

9/9

You might also like