Hello,
I am trying to create a singleton value type for use as a dummy in an
overoaded constructor. My question is, if a method passes SNull.Instance as
a parameter, then I understand that a copy of SNull is made instead of
passing by reference. I assume this means that my attempt at a singleton
value-type has failed... Anyone have any ideas on how this can be
accomplished?
using System;
struct SNull {
private static readonly SNull instance = new SNull (null);
private SNull (Object dummy) {}
internal static SNull Instance {
get {return instance;}
}
}
Cheers,
Adam
_______________________________________________
Mono-list maillist - [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list