Using /clr and __declspec(thread)

Sorry I haven’t been writing much lately, but a lot has been going on in Expression land.  I’ve switched over to working on build and setup development so you can expect to see the flavor of my posts change somewhat. Here’s a frustrating bit I ran into playing around with C++/CLI:  __declspec(thread) isn’t supported by…


Looking at double buffering and the new BufferedGraphics classes

I started spending some time looking at double buffering with Windows Forms a little while back and noticed that in the 2.0 framework there are a couple of new BufferedGraphics classes.  I toyed around with them a bit and got them to work, but didn’t really understand what was going on.  Looking into things again…


Setting up C++ Interop (with Win32) in VS 2005.

I’ve already given the steps necessary to make this happen in an earlier post, but as this will come up so much I decided to pull it into a seperate post with more explicit details.  The basic things you need again are: /clr option set for the project.  (Common Language Runtime support property under General.)…


Inlining IL link

A tool for inlining IL in C#/VB.  (Essentially.)


Generic Collections IV

Back again, and as promised… Subclassing Generic Collections The framework provides three basic collections that are intended for derivation.  They are located in System.Collections.ObjectModel: Collection<T> KeyedCollection<TKey, TItem> ReadOnlyCollection<T> They are all intended to provide base implementations of the following interfaces: IList, IList<T> ICollection, ICollection<T> IEnumerable, IEnumerable<T> Collection<T> stores it’s data internally as IList<T> (and also takes IList<T> in…


Generic Collections III

So far I’ve gone over the basics of generic collections and moved on to looking at List<T> and Predicate<T>.  As mentioned yesterday, this post will deal with subclassing and the other System delegate types. The “Other” System.Delegates  We’ve already looked at System.Predicate<T>.  Now we can turn our attention to the rest of the System deleagte types: Action<T>…


Generic Collections II

In yesterday’s post I went over the very basics of generic collections in the 2.0 .Net framework.  Today I pick up where I left off with… Predicate<T> System.Predicate<T> is a generic delegate that is used to specify a search condition method to pass to the generic collections.  It simply takes an object of type <T>…


Generic Collections I

In one of my first posts I briefly mentioned that I would discuss a bit about what I’ve learned about using the new generic collections.  I’ve been putting it off a bit because I knew it would be a bit lengthy, but I really feel this is important so I’m going to push myself to…


A little more on bytes and endianness (byte order)

In my last post I talked about converting structs into byte arrays and vice versa.  There are a couple of related posts I’ve found that are worth reading: Read binary files more efficiently using C# Convert Integers to Byte Arrays The first post gives a nice example on converting a type (class, struct) from one…


Byte of a struct and onto endian concerns

[Updated: added performance data. 7/19] I haven’t written for a while, but it hasn’t been for lack of things to write about.  Just been a little busier than normal lately.  I’ll let you imagine why. 😉 Something that I’ve been working on is parsing graphics files for testing (in C#).  It’s useful to know all…