Miscellaneous Debris

Avner Kashtan's Frustrations and Exultations

  • A silly little C# language feature request: .! operator

    Tags: C#

    When we step back for a moment from our SOAs and Factories and Polymorphism, we have to admit that at the root of much of our code lie a hell of a lot of simple if/else statements. Like it or not, … more

  • File Properties in Word 2007

    Tags: Office

    A client asked me the other day what happened to File->Properties in Word 2007. They simply couldn't find it.In the Beta1 TR, I remember it was confusingly located on the Status Bar (!) – … more

  • Ping Notifier!

    Tags: .NET, CodeSnippets

    How many times have you connected to a server via Remote Desktop to install some components?How many have you rebooted a remote server and sat around waiting for it to go up?How many times have you … more

  • Visual Studio obstructing DebugView

    Tags: .NET, Visual Studio

    I've mentioned it before, but SysInternal's DebugView is a great utility. It allows you to get the Debug.WriteLine() strings from your application even when you're not attached with a debugger, … more

  • My Singleton is disappearing!

    Tags: .NET, WCF, WinFX

    WCF's Instance Context model allows me to specify my service's instantiation behavior - I can get a new instance for every call, have WCF manage a session for me and keep an instance per session, or … more

  • Hiding properties from the Property Grid

    Tags: .NET, CodeSnippets

    Taking a break from the main components, I decided to get around to writing a small configuration editor using .NET 2.0's lovely ability to edit .config files from code. I have a custom Section … more

  • URIs are not local paths.

    Tags: .NET

    It's easy to forget that even though a local filesystem path ("C:\MyDir\MyFile.dll") can be represented as a Uri (file://C:/MyDir/MyFile.dll), these two entities are different, and have different … more

  • ParamArrays and CLS-compliance.

    Tags: .NET, C#

    In my previous post, I noted that when I write this code in C#: public void MyMethod (params object[] args) { ... } What I actually get in my IL is this: public void MyMethod ([System.ParamArray] … more