How to declare a property in a class?



How to declare a property in a class?..

Answer / Sujeet Kumar Singh

To declare a property in C#, you use the `private` access modifier for the backing field and the `public` access modifier for the property itself. The getter and setter are created automatically by the compiler.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

How long will it take to learn c#?

1 Answers  


What is the correct way of declaring an xml namespace?

1 Answers  


What is predicate builder?

1 Answers  


What is datareader c#?

1 Answers  


What is sql transaction in c#?

1 Answers  


How do I do implement a assert?

1 Answers  


Explain About sn.exe

1 Answers  


What is escape sequence in c#?

1 Answers  


What are different properties provided by Object-oriented systems?

2 Answers  


Explain ACID rule of thumb for transactions.

3 Answers  


Which function is the entry point for a DLL in MS Windows 3.1?

1 Answers   3i Infotech,


How does dictionary work in c#?

1 Answers  


Categories