Browse by Tags

All Tags » CLR Internals » Quick Tips (RSS)

Regex: Functionality about named/numbered groups everyone should know.

We have a cool new tool amongst us over on http://www.regexlib.com/RETester.aspx . It is already more functional than the previous tool there that was receiving quite a bit of traffic and attention for quickly testing expressions. The new tool really...

The problem with APIs like System.IO is that people ask questions like "How do I copy a StreamReader?"

The basic layout is generally that the user wants to pass a particular StreamReader instance to some method that does some processing. Upon return they find that their StreamReader in the local scope is now not where it was when they first called the...

Follow-up: Toast Windows and AnimateWindow, a user found issue.

You can check out the previous entry here Watch out for "Power Toys", sometimes you get more than you bargained for. However, I'm more interested in examining why the failure occurs when adding a label. This is an issue that one of the users found when...
Posted by Justin Rogers | with no comments

Packing single assembly apps that have resources and some notes about the delay loader...

References: [1] I often get asked how one would ship a single assembly app that is in multiple assemblies... If you haven't read my entry on packing assemblies into a single assembly for one file deployment, then you won't get much out of this posting...
Posted by Justin Rogers | with no comments

I often get asked how one would ship a single assembly app that is in multiple assemblies...

Well, you have some options. MS Research has the ILMerge utility, though I've found it doesn't work super great. I've seen some other tools that claim to do the same thing, but haven't played with them. I'm going a different approach. I'm going to show...

Article on file line counting algorithms. Covering fast exact counting and statistical counting.

Someone asked a question on the C# newsgroup yesterday and a large number of answers have been flying around. Some people actually tend to recommend using a StreamReader to count lines (ouch) since they generally work with small files. The FileStream...

Lightweight Code Gen and mathematical equations.

Using lightweight code gen for dynamic scripting languages is cool and all, but imagine the possibilities for the language of mathematics. Sure you can try to write some generics that handle common tasks, perhaps a generic method or two, but lightweight...

.NET Immutability Tip #1: Nothing is immutable.

I figured I'd start with the obvious. You can never control a machine 100%, so there is always the opportunity that whatever systems of protection you have in place, they can be overcome. This same principle applies to security and cheating systems as...

Brad Abrams talks about mutable read-only fields and I attempt to elaborate.

Brad Abrams posts an article on Mutable reference types should not be read-only fields . You really have to think about what this means. In the example he creates a new type, say F, that has some internal data. On another type, he creates a read-only...

DWC.Algorithms.NumberUtilities with the latest hopefuls, a test case runner, and some comments...

So the latest code prop does SByte, Byte, Int16, UInt16, and Int32 parsing. All deprecated methods have been moved to a secondary class to reduce the size of the primary class (statics and whatnot). I've added a licensing agreement, since I want to protect...
More Posts Next page »