[Mono-list] Constructors in C#

Brice Carpentier brice@daknet.org
Fri, 19 Nov 2004 22:25:37 +0100


Bernd Waibel wrote:
> On Fri, 19 Nov 2004 19:15:32 +0100
> Brice Carpentier <brice@daknet.org> wrote:
> 
> Hello,
> 
> if I'm right, you want to intialize a member variable
> with some default value. Why don't you initialize it
> directly at declaration time? You should be able to use
> 
> public class MyClass
> {
> 	private String member = "stuff";
> 
> 	public MyClass() { }
> 
> 	...
> }
> 
> 
> hth bernd
> 
please read the whole thread since it explains quit well what I'm doing, 
and I don't want to repeat myself too much (and make more errors each 
time ;))

Regards,

-- 
Brice Carpentier aka Br|ce