Some notes on software development... RSS 2.0
# Friday, 15 August 2008

When trying to use anonymous methods called by Control.Invoke, like so:

this.Invoke(delegate { txtTest.Text = "Hello World"; });


you get the follow compiler error:

image

This is because the Delegate class, expected by the Control.Invoke method, is not a delegate type which the anonymous method is.
To work round this you can cast the anonymous method to a MethodInvoker delegate.
Our previous code now becomes:

this.Invoke((MethodInvoker)delegate { txtTest.Text = "Hello World"; });


Guy Mahieu has a nice blog about it here.

 
Friday, 15 August 2008 16:13:17 (GMT Standard Time, UTC+00:00)  #    -
C#
# Thursday, 14 August 2008

Mark Russinovich has a great blog entry describing the Windows OS memory limits. He explains why you never get the full 4Gb on 32-bit Windows XP machine.

Links
Pushing the Limits of Windows: Physical Memory
Mark Russinovich's Blog

Thursday, 14 August 2008 15:47:00 (GMT Standard Time, UTC+00:00)  #    -
Windows
# Thursday, 17 July 2008

Eindhoven University of Technology have a great tool called SequoiaView for displaying a treemap of the contents from a hard drive.
With it you can easily see what large files are consuming your disk space. Here is a pic of my drive:

image 

Links:
SequoiaView
Eindhoven University of Technology

Thursday, 17 July 2008 18:36:47 (GMT Standard Time, UTC+00:00)  #    -
Tools

To use NAntAddin 2005 with Visual Studio 2008 download the latest binaries here.
Extract the NAntAddIn files to My Documents\Visual Studio 2008\Addins
(note: you may need to create the Addins folder if it doesn't exist).

image

Open the NAntAddin.AddIn file in a text editor and change the Version node from 8.x to 9.0:

image

Close the file. Start Visual Studio 2008 and open the Add-in Manager (Tools -> Add-in Manager).

image

NAntAddin should be in the list. Check the Available and Startup checkboxes.
The NAntAddin should now be available from the Tools menu.

image

The last bit of configuration needed is to tell NAntAddin where the NAnt executable is located. You can do this via the NAntAddin options panel.

image 

You are now good to go with NAntAddin for Visual Studio 2008.

Links:
NAntAddin for VisualStudio 2005 Download

Thursday, 17 July 2008 09:14:31 (GMT Standard Time, UTC+00:00)  #    -
NAnt
Navigation

Sign In
Extras
Statistics
Total Posts: 116
This Year: 0
This Month: 0
This Week: 0
Comments: 36
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2018
Hadrian Phillips

All Content © 2018, Hadrian Phillips
DasBlog theme 'Business' created by Christoph De Baene (delarou)