2005-08-11

I just came upon this question in a newsgroup and had a quick look at the new classes that .NET 2 offers for access to the Windows file system ACLs and general system security information. In short, to get to the name of a user or group that’s the owner of a directory in the file system, you can use the following code:

DirectoryInfo directoryInfo = new DirectoryInfo(@"c:\Windows");
DirectorySecurity directorySecurity =
  directoryInfo.GetAccessControl(AccessControlSections.Owner);
Id ...

2005-08-10

Lookahead and lookbehind assertions are a feature of regular expressions that’s not needed as often as others. The .NET regular expression implementation has full support for them and the documentation is here. But what exactly are they good for? What do you do with them?

One answer is, they can be quite important when using regular expressions for replacing parts of strings. The reason for this is that a regex replacement always replaces the complete matched text. It’s possible to use substit…


2005-08-05

There’s a new release available of Refactor! Pro by Developer Express and there are some awesome new refactorings in it. A lot of work has been put into the so-called preview hinting, that allows the user to see what exactly is going to happen when a specific refactoring is executed. This screenshot should tell you a lot about preview hinting (granted, in an extreme scenario):

previewhintingextractmethod.gif

It’s probably worth repeating that …


Yesterday, Developer Express released new versions of their fantastic tools CodeRush and Refactor! Pro (I already blogged about the latter today). I have made new versions of my two CodeRush plugins available, both compiled against the new CodeRush version 1.1.28. An important change was made to the OpenToolWindow plugin (find the original announcement for that one here), to make use of a property in the CodeRush core that’s now public. So if you want to use OpenToolWindow with CodeRush >= 1.1. …


2005-07-30

This was a question in a newsgroup today: given the choice, is it better to test for multiple matches of a regular expression or to let the expression match multiple captures at the same time. My reply was that I thought multiple captures might involve less overhead in the regular expression engine because the capture matching is an intrinsic part of the engine algorithm, while finding multiple matches means running the expression against the input multiple times. But then I thought that the fi …


I guess every computer user in the world has (been) asked that question at least once, and many have invested a lot of time in the quest for the best, if not the perfect, text editor. Apparently many aspects of the problem are a matter of taste, and the fact that the technical environments are changing all the time (and even faster for us programmers than for most other people) doesn’t make it any easier.

I have once again decided that I should have another look at what’s available and I thoug …


I’m using Developer Express XtraBars in my .NET applications. With one of the latest releases, XtraBars also support the new skinning technology, which the website depicts quite inadequately but which takes the experience of an application based completely on DX controls to a new level visually. Now who would have thought that a package such as this would have grave deficiencies in other areas? Well, custom drawing is one such area.

Recently I wanted to create a simple bar item that would be a …


Recently, there have been several requests in the XPO newsgroup about problems with serialization, in conjunction with ASP.NET. I’m still unclear if these issues all had the same sources, but when somebody approached me personally about this today, I thought I’d just look into the web services problem. Please note that I made these tests on the .NET 2 platform, so there may be differences to .NET 1.1. What’s more, ASP.NET and web services are not something I usually have much to do with, so I m …