Thursday, 20 December 2012 13:54

c# properties

Written by 
Rate this item
(0 votes)

if you know about Object oriented way of programming
you know how much role a property plays.

Properties
identifies the elements of an object for modification
or reading from the outside world.

properties are implemented by 2 methods get and set.
questions is how? here is how-

private int element;
public int Element{
get (){return element;};
set(){element=value}}

above is a simple way to demonstrate manipulation of
properties.you can utilize complex logical expressions
inside the get or set method on elements.

If you are a novice programmer or a expert programmer
you should keep in mind and use properties for
OOP programming.

Read 1157 times
Super User

Email This email address is being protected from spambots. You need JavaScript enabled to view it.
Login to post comments