C# .Net 1.1 Compression
Unfortunately when using C# with .Net 1.1 there is no standard way to zip or unzip files. Various 3rd party products exist, both open source and closed source, but perhaps a better solution is to use J#.
J# exposes classes in the java.util.zip namespace which provide the ability to compress and uncompress files. This MSDN
link describes how you can call those classes from your C# code.
Comment restrictions removed
I've removed any restrictions on who can comment. Apologies for not setting this sooner, an oversight on my part when I created this blog.
C# String Formats
In asnwering a google groups post this evening I found this particulary helpful list of string
formatters. The google groups post was asking how one can format an int of value 3 to a string "003". Two methods that immediately spring to mind are:
int i = 3;
string s1 = i.ToString ("000");
string s2 = String.Format ("{0:000}", i);
The google groups post can be found
here.
Microsoft Empower
Ian Moultster writes in his
blog about Microsoft's
Empower scheme. Empower provides developers with a heavily discounted MSDN sucscription as well as other Microsoft software including Windows and Office for about £260 a year.
Still a tad more expensive than a Linux/Mono setup, but a very reasonable offer non the less.
Clover
As I mentioned in the post below, Clover is one of the reasons that I have become such an advocate of unit testing. Clover is a test coverage analysis tool. Clover instruments your code, so that as each instruction, conditional, or method is executed calls are made to the Clover assemblies. The Clover assemblies keep track of which aspects of your code has been executed, which haven't, and very importantly what has been the result of conditional checks.
So, for example, if your code contains the line
if (object == null) and you have 'Clovered' (the process of instrumenting your code with calls to the Clover assemblies) your code, then Clover will be able to generate a report which tells you not only how many times that line of code has been executed, but also how many times
object == null has evaluated to true and how many times it has evaluated to false, even highlighting if the condition has always evaluated to true or to false.
How does this fit into Unit Testing? If automated unit tests are carried out on Clovered code then you can use the clover reporting tools to generate coverage reports that tell you exactly which aspects of your code have been exercised by the unit tests. By analysing the clover reports you can tweak and improve your unit tests until you have a satisfactory level of test coverage.
Clover is also extremely useful in system test, load test, soak test, and UI test scenarios. Imagine a situation where your C# GUI is delivered to a tester who has a test specification to work through. If clovered code is delivered, on completion of testing by the tester, a clover report can be generated showing exactly which lines of your GUI code have been executed, which branches have been tested, and which forms or controls were completely missed by the tester/test specification.