Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Adjust line to a declaration
Message
De
08/06/2012 10:41:28
 
 
À
08/06/2012 09:56:53
Information générale
Forum:
ASP.NET
Catégorie:
LINQ
Versions des environnements
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Divers
Thread ID:
01545606
Message ID:
01545664
Vues:
28
>>No. A Property, by definition, has get and/or set accessors. A public variable OTOH is, strictly speaking, referred to as a Field....
>>
>>http://msdn.microsoft.com/en-us/library/43s90322(v=vs.80).aspx
>
>Is this a terminology specific to .NET or global?

For .Net I think it's defined in ECMA-335 (as “A class member that defines a named value and the methods that access that value. A property definition defines the accessing contracts on that value. Hence, the property definition specifies which accessing methods exist and their respective method contracts" )

>Inside a class, we have methods, those are DIM declared variables, thus known as variables. I always referred to those class PUBLIC declarations to be known as properties.

>I know that therminology property in VB or VB.NET by the use of Get/Set was being known as property. But, generally, if we go outside this .NET environment, will a PUBLIC declaration on top of a class be known as property?

No. But the definition of a property may be looser in other environments. AFAIK in JavaScript, for example, any publicly accessible class data member accessed via the '.' notation is referred to as a property.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform