Welcome to MSDN Blogs Sign in | Join | Help

System.Blog.Martens.Ben

The Tech Blog of Ben Martens

May 2008 - Posts

Brain Teaser #3 Answer
If you haven't read the question yet, you can read it here . The answer for this lies in the C# specification. Specifically, read section 8.13. There are two different ways you can use a using statement and in this case we are interested in the second Read More...
Brain Teaser #3
This brain teaser also comes courtesy of Simeon Cran. What will the following code output? When you think you know, copy the code into Foo.cs and run “csc Foo.cs” and then run “Foo.exe”. Did it output what you expected? The brain Read More...
Brain Teaser #2 Answer
Have read the question yet? Read it here . The problem is pretty simple if you have 00111 (where all the bits after the first 1 are also 1’s.) You shift right, run the NOT operator, and then AND that result with the original. For example: ORIGINAL Read More...
Page view tracker