Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
How to declare a property in a class?
Home
C Sharp
How to declare a property in a class?
0
votes
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
How to declare a property in a class?
#property-class
#c-property-class
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 6, 2020
by
Robindeniel
int m_PersonID = 0;
public int PersonID
{
get { return m_PersonID; }
set { m_PersonID = value; }
}
Your comment on this answer:
Email me at this address if a comment is added after mine:
Email me if a comment is added after mine
Privacy: Your email address will only be used for sending these notifications.
Related questions
0
votes
Q: Can subclass overriding method declare an exception if parent class method doesn't throw an exception?
asked
May 3, 2021
in
JAVA
by
Robindeniel
#subclass
overriding
java
Java-questions-answers
+1
vote
Q: Can we declare the static variables and methods in an abstract class?
asked
Dec 7, 2020
in
JAVA
by
SakshiSharma
#static-variable
#abstract-class
Java-questions-answers
0
votes
Q: Define Property in C-Sharp?
asked
Feb 16, 2020
in
C Sharp
by
rahuljain1
#c-sharp-property
0
votes
Q: Which element of hbm.xml is used to map a Java class property to a column in the database table?
asked
Jun 4, 2020
in
Data Handling
by
SakshiSharma
#hibernate-database-table
DataHandling-questions-answers
0
votes
Q: If you add a component class property named name and assign it a string value of The Redemption
asked
Dec 15, 2023
in
Angular
by
AdilsonLima
angularjs-interview-questions-answers
0
votes
Q: If a property named temp is defined in a class, which of the following decorator statement is required for setting the temp attribute?
asked
Jan 17, 2021
in
Python
by
SakshiSharma
#temp-setter
#property
Python-questions-answers
0
votes
Q: What is the purpose of displayName class property in ReactJS, explain with example?
asked
Nov 3, 2023
in
ReactJS
by
AdilsonLima
reactjs-interview-questions-answers
0
votes
Q: Is overriding of a function possible in the same class?
asked
May 6, 2020
in
C Sharp
by
SakshiSharma
#method-overloading
0
votes
Q: What is the difference between a struct and a class in C#?
asked
Feb 16, 2020
in
C Sharp
by
rahuljain1
#c-sharp-struct
+1
vote
Q: What is a Sealed class in C#?
asked
Jan 20, 2020
in
C Sharp
by
AdilsonLima
...