Ramon Smits

Tell me your secrets and i'll tell you mine

Browse by Tags

All Tags » CSharp (RSS)
Cool finalizer assert trick
I just saw a cool trick done in a finalizer of a class. When a class implements IDisposable then its creator needs to call Dispose when it is finishen. Lots of developers forget this and that usually results in system resources that are locked until the...
Posted: Sun, Apr 12 2009 3:24 PM by Ramon Smits | with no comments
Filed under: ,
Get the physical path of a path that uses a subst drive
My previous employer used a tool to attach databases that were located on a substituted path. I needed this conversion logic in another kind of environment and used the almighty google. So I hit an article on Avner Kashtan 's blog titled Query SUBST information...
Tool : Add string as resource
I found this really nice little to add a string as a resource . You just select a string in the editor, right click to get the context menu and select to add it as a resource. You then get a dialog in which you can specify the key value and the resourcefile...
The && and the & operators
Today a collegue had me flabbergasted by using the & operator in a boolean comparison like the following example. return x & y; Both x and y were booleans and I said "Hey you just forgot an &! A single & is a bitwise operator.". And he...