Browse by Tags
All Tags »
Tipps&Tricks (
RSS)
When writing more complex code you cannot really step through during debugging, it´s helpful to put stud it with statements tracing the execution flow. The .NET Framework provides for this purpose the System.Diagnostics namespace. But whenever I just...
.NET developers love XCOPY deployment. And they love single assembly components. At least I always feel kinda uneasy, if I have to use some component and need remember a list of files to also include with the main assembly of that component. So when I...
Martin Fowler in his famous article "Inversion of Control Containers and the Dependency Injection pattern" has compiled a number of ways how to dynamically bind a client to a service. I now would like to add two points to the discussion: firstly...
Quite a bit has been written about reading structured binary data from or writing it to files (see [1,2,3]). [1], for example, compares three different approaches. Unfortunately none is as straightforward as C/C++ code would be. Here´s how you could read...
I. Enable Intellisense Support 1. Create XML Schema Create a XML Schema for the XML files you want to edit within VS.NET. (If you´re not familiar with XML Schema, start out with an example XML file and use xsd.exe (one of the VS.NET tools) to generate...
Unit testing .NET Fx projects basically is easy with NUnit and I don´t want to add to the literature on unit testing at this point. However, the devil´s in the detail. To make unit testing a really smooth experience from within VS.NET, the test...
When I started playing with Whidbey´s ADO.NET ObjectSpaces object persistence technology (see [1] for an introductory article) I immediately ran into two nasty problems costing me a long time to solve: 1. Trying to avoid problems I started with a...
In my previous posting (" Check for logged on user on Windows machine ") I showed a WMI-based method to check, if a certain user was logged on. Andreas Häber then suggested in a comment, to use the Win32 API function NetUserEnum instead. Since WMI...
Motivated by a posting in a user group I tried to find the answer to the question: How can a Windows Service find out, if a user has already logged onto the machine it is running on? I googled for a while and it seems, there is no simple function like...
Recently I again stumbled into a situation where I just wanted to test, if a certain portion of my code would also work, if it ran under different Windows user accounts. But instead of switching users by hand, I wanted to impersonate them in my code....
More Posts
Next page »