I just started playing with MbUnit, or at least that’s what I had in mind — found out then that it comes in that Gallio package these days, with all sorts of stuff on board that doesn’t all have a clear purpose. Clear to me, that is. Well, I think at this point that I would prefer to have a simple package comparable to NUnit, but maybe when I see what’s in there, I’ll change my mind.
Anyway, so far, so good — I took a small test project with five tests in it, which was working with NUnit so …
It seems to turn into a shoot-out: listing directories is suddenly en-vogue! :-) So, Craig Andera posted this code in written in Clojure, which lists some directories lazily, and Chris Sells thought he could do that in C#, too. I thought these code examples all look rather verbose — in the case of Clojure because in that way rather typical for Java, the APIs are pretty verbose to use, and in the case of C# because of all the syntactic, well, ahem, necessities, as well as the fact that there’s …
I thought I was being pretty cool with this code:
IEnumerator System.Collections.Generic.IEnumerable.GetEnumerator( ) {
Action<UnbalancedBinaryTree> yielder = null;
yielder = t => {
yielder(t.Left);
if (!t.IsEmpty)
yield return t.Value;
yielder(t.Right);
};
yielder(this);
}
But as it turns out (and I think I knew before, but had forgotten), C# doesn’t accept this. Not in 3.0 at least, and I think not in 4.0 either. Need to test. Meanwhile — why? Hm…
… or maybe this is not a recent change at all, I don’t really know. Long ago I blogged before about the ways Google misunderstands me, and nothing has changed on that particular count. Today I noticed that there’s a new way Google intentionally misinterprets my query. Weird. So, I was searching for Comparer
(try it yourself). Right at the top of the page, Google says this:
Showing results for Icomparer. Search instead for Comparer
Brilliant, eh? I’m starting to think it would be good if …
I don’t have a clue whether it works! No, really! I have a T-Mobile stick that looks exactly like the one on this page. On the back it says “web’n’walk Stick III”, and “HSPA USB Stick” and “Huawei Technologies Co. LTD”. This may or may not be similar to other sticks called “web’n’walk stick III” in other countries — I found mention of a similarly named device in Germany, but there were also links there to drivers made by a company called Option or similar, and I don’t think that has anything t …
I’m interested — which IoC containers do people use for .NET? Or do they use any? I created a poll, quite small and very quick :), which should appear below. I’d appreciate your help! Just in case the form doesn’t show up, here’s a separate link to it [LINK REMOVED].
Update: I had some requests to provide for an option “I’ve heard of this, but never tried it”. Unfortunately, Google doesn’t allow me to add columns to the grid with all the radio buttons — the five you get by default are also t …
I posted some sample code recently, for some tests with C# 4.0 dynamic. Now I’ve found a new interesting thing — perhaps this is also related to using beta 2 instead of the RC, again I’ll try this when I get around to it. The thing is, I have created my own dynamic object:
public class MyDynamicType : DynamicObject {
public override bool TryInvokeMember(InvokeMemberBinder binder,
object[] args, out object result) {
Console.WriteLine("TryInvokeMember {0}", binder.Name);
...
Update: Since this behavior hasn’t changed in VS 2010 RC, I have reported the problem to MS on their Connect Site: Dynamic Dispatch in C# doesn’t seem to work in simple case
I’m testing a few things with VS 2010 beta 2, around the “dynamic” keyword in C# 4.0. Mostly good, but there’s a bit of odd behavior — I thought I’d post about it, in case somebody has a comment, and so I don’t forget to test again once I go to the RC again (had it installed the other day, just to find there was no co …