Phil asks:

"Your last post mentions using Marshal.SizeOf to get the byte size of a type that can be marshalled.  I would like to know the amount of space taken up by an object that cannot be marshalled. For example a custom control, so I can then spend time reducing its size and check afterwards to see if it has had the required effect."

There are several ways to do this, but the most direct I can think of is to use strike to get this information.  In the debugging memory leaks article, there are instructions for how to use strike to inspect your objects.  This also gives you object size information. 

I would create one instance of the control, then put a breakpoint in your application sometime after it's created.  Then, from the VS immediate window do:

!load sos
!dumpheap -stat

Then look for your object.

...but all of this said, you might consider using the CLR profiler (video, video, howto) first to discover if there is low hanging fruit; it will watch the allocations you're using and display them in a graph.  This way you can focus on the things that will make the most impact.

Using strike to determine the size of an object

Here's what happens when I comment when you make the number of bools go from 9 to 8 from Foozle (note going from 8 to 7 does not yield the same benefit).

  Foozle f = new Foozle();
 
Console.Write("foo");  // <-- breakpoint here.  Load up strike.

Trial 1, 9 booleans

        public class Foozle {
            private bool bool1;
            private bool bool2;
            private bool bool3;
            private bool bool4;
            private bool bool5;
            private bool bool6;
            private bool bool7;
            private bool bool8;
            private bool bool9;
        }

Immediate window
!load sos
extension C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\sos.dll loaded
!dumpheap -stat
PDB symbol for mscorwks.dll not loaded
total 2077 objects
Statistics:
      MT    Count    TotalSize Class Name
...
009130e8        1           20 WindowsApplication50.Program+Foozle
...
Total 2077 objects

Trial 2, 8 booleans

        public class Foozle {
            private bool bool1;
            private bool bool2;
            private bool bool3;
            private bool bool4;
            private bool bool5;
            private bool bool6;
            private bool bool7;
            private bool bool8;
          //  private bool bool9;
        }

Immediate window
!load sos
extension C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\sos.dll loaded
!dumpheap -stat
PDB symbol for mscorwks.dll not loaded
total 2077 objects
Statistics:
      MT    Count    TotalSize Class Name
...
009130d8        1           16 WindowsApplication50.Program+Foozle
...
Total 2077 objects

Hope this helps!