Re: Atributo [DefaultValue()]
Oscar Acosta <[email protected]> Tue, 6 Jul 2010 03:49:39 -0700 (PDT)
| Newsgroups | gmane.comp.gnome.mono.hispano |
|---|---|
| Message-ID | <[email protected]> |
Message: 1 Date: Mon, 5 Jul 2010 08:50:12 -0700 (PDT) From: Juan Carlos Ferrández <[email protected]> Subject: [Mono-hispano] Atributo [DefaultValue()] To: [email protected] Message-ID: <[email protected]> Content-Type: text/plain; charset=UTF-8 Buenas. Tengo la siguiente propiedad en un widget que estoy creando: [DefaultValue (true)] public bool AdmiteNegativos { get { return wAdmiteNegativos; } set { wAdmiteNegativos = value; } } Al añadir el widget en modo diseño a una ventana GTK, la propiedad se muestra a false (check no marcado). ¿ Que hago mal ? Un Saludo JC Hola Juan: Añade un constructor a la clase. En el mismo, inicializa el campo wAdmiteNegativos a true. El valor por defecto de un boolean es false. Saludos, Oscar Acosta _______________________________________________ Mono-hispano mailing list [email protected] https://listas.hispalinux.es/mailman/listinfo/mono-hispano