Connecting Tech Pros Worldwide Help | Site Map

Default property

Toze
Guest
 
Posts: n/a
#1: Oct 10 '06
How do I set a default property in C#? In VB we use the default keyword
before the property.
Chris Fulstow
Guest
 
Posts: n/a
#2: Oct 10 '06

re: Default property


Check out C# indexers:
http://msdn2.microsoft.com/en-us/library/6x16t2tx.aspx
http://msdn2.microsoft.com/en-us/library/2549tw02.aspx

Toze wrote:
Quote:
How do I set a default property in C#? In VB we use the default keyword
before the property.
Pete Kane
Guest
 
Posts: n/a
#3: Oct 10 '06

re: Default property


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Toze wrote:
Quote:
How do I set a default property in C#? In VB we use the default keyword
before the property.
[DefaultProperty("Text")]
class test
{
public string Text;
}

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFK7TAw/7X1afViQoRAtGKAJ9vcHyv4DkC8nfvZRevTPUDFxkjjQCfZMSR
I0yW1nKb/K444wvpIMDH964=
=MfhQ
-----END PGP SIGNATURE-----
Closed Thread