Joined September 2012
·

Kevin Bost

Software Craftsman at Olive Tree Bible Software
Software Craftsman
Olive Tree Bible Software
·
Washington
·
·
·

Posted to Re-writing methods using LINQ over 1 year ago

@rickbeerendonk
Thank you for your comment. You are correct that a class like the EmployeeManager referenced above is a poor design for a class. However, the purpose of the post was to show how to re-write a method that was using a for loop by utilizing the Enumerable.Range method. Creating a complete real-world example requires much too much code and takes away from showing a simple technique; in this case a way to replace a for loop.

As a side note, once you get the window into "Move" mode, and press an arrow key once, you can simply jiggle the mouse and the window will snap to your mouse cursor and let you use the mouse to determine its final destination.

Posted to Regex testers over 1 year ago

I personally favor using Expresso: http://www.ultrapico.com/Expresso.htm though it is not a web based tool.

@diegodfsd
Would it not be just as easy to do a type conversion using the ‘as’ keyword?
var id = reader[columnIndex] as int?;
Personally I like to avoid extension methods that act on System.Object as it clutters the intellisense.

Can you provide an example where this extension would need to be used. There is an implicit type conversion on Nullable<T> to covert from T to T?.
http://msdn.microsoft.com/en-us/library/2cf62fcy(v=vs.80).aspx

Posted to Visual Studio XML Comments over 1 year ago

For the super lazy check out Ghost doc for handling the inserting of comments. Please note that these comments will almost always still need to be edited before they are actually useful.
http://submain.com/products/ghostdoc.aspx

Posted to Time for stfrtime to die. over 1 year ago

Could you add examples comparing the difference in your code with the original stfrtime call?

For an alternate implementation that does not require using Reflection to find the Close method see this tip:
http://coderwall.com/p/hknghw?i=6&p=1&q=sort%3Acreated_at+desc&t[]=codeplex&t[]=xunit.net&t[]=linq&t[]=wcf&t[]=scanning

Posted to Visual Studio clipboard gotcha over 1 year ago

@adamhewitt627 Yes you are correct, this is a old-school windows method for the cut operation.

Achievements
1,192 Karma
60,359 Total ProTip Views