DotNetKick.com is an open-source project. Please report any bugs and let us know your great suggestions. Currently running svn revision 620 (rss)

Kick Spy!, Kick Zeitgeist and Kick Widgets

1
kicks
submitted by dotnetfunda dotnetfunda 3 months, 1 day ago

dotnetfunda.com — Points that I am going to discuss are not an expert advice, however, based on my knowledge & experience. If any one has any comment or suggestions, I will be glad to hear.

Add a comment 1 comment | category: | Views: 15 | Get KickIt image code
tags: | tag it

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:

Comments:
I mostly agree with that, however you should not use Hungarian notation (int intCategoryId or string strName) in C#, if you use any code profiling tools such as FxCop they will pick up on this. Also in a case sensitive language you should use casing (private int categoryId, public int CategoryId) instead of m_ to differentiate between member and public properties.

On a personal note, I don't believe in commenting for the sake of commenting so where you have

// Instantiate category object
Categories categories = new Categories();
// Load the category
categories.Load();

I would not bother, in that case it is perfectly obvious what you are doing, comments should be used to explain certain behaviour and why it was chosen. Developers dislike commenting code, therefore it is much better to write readable code using self explanatory names for classes, properties, methods, variables etc. and just save comments to describe complex behaviour or justify business logic for future reference.

Where possible, objects that implement IDisposable should be used in a using statement which is automatically compiled down to a try, finally code block. This helps reduce the possibility of an object that has specific disposal requirements from not being disposed properly.

using(obj o = new obj())
{
obj.DoSomething();
}

gets translated into

try
{
obj o = new obj();
obj.DoSomething();
}
finally
{
obj.Dispose();
}

at compilation. obviously this only really works when you are creating, using and disposing an object inside a single method call, if you are passing an object about that implements IDisposable then you should still call the dispose method manually.
posted by Tr3v 3 months ago



information Login or create an account to comment on this story
 

Sponsored Link: www.carlist.ie

Search:

Ads via The Lounge