Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
Properties<br />
public class Human<br />
{<br />
private int m_Age;<br />
public int Age<br />
{<br />
set<br />
{<br />
if (value > 0)<br />
{<br />
m_Age = value;<br />
}<br />
else<br />
{<br />
}<br />
}<br />
A better way of exposing<br />
data members, through a<br />
public property and<br />
private field for storage<br />
throw new ArgumentOutOfRangeException("Age invalid");<br />
}<br />
}<br />
get{return m_Age;}<br />
25