Quantcast
Channel: Visual C# forum
Viewing all articles
Browse latest Browse all 31927

Question on Class Accessors C#

$
0
0

Hi,

I was reading some tutorials on database object layers.  Can anyone explain the purpose of putting "[]" before accessors like the code snippet below? 

int _id;


[DisplayName("Identity")]
[Category("Column")]
[DataObjectFieldAttribute(true, true, false)]//Primary key attribute 
public int ID
{
get { return _id; }
set { _id = value; }
}

Thanks


Viewing all articles
Browse latest Browse all 31927

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>