Home / Questions / How to declare a property in a class?
Explanatory Question

How to declare a property in a class?

👁 551 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

int m_PersonID = 0;  
public int PersonID  
{  
get { return m_PersonID; }  
set { m_PersonID = value; }  
}