Home » Aptitude Questions and Answers » C# Aptitude Questions and Answers

C# Properties Aptitude Questions and Answers | Set 1

C# Properties Aptitude Questions | Set 1: This section contains aptitude questions and answers on C# Properties.
Submitted by Nidhi, on April 10, 2020

1) There are following statements are given below, which of them are correct about properties in C#.NET?
  1. Normally, properties are used to set and get values in private members of the class.
  2. Properties cannot be overloaded.
  3. Properties can be overloaded.
  4. In the new version on C#.NET, properties are not supported.

Options:

  1. Only A
  2. Only C
  3. B and D
  4. A and C

2) Is it true, we can only create read-only properties in C#.NET?
  1. True
  2. False

3) What is the keyword is used to create read property in C#.NET?
  1. read
  2. getProp
  3. get
  4. readProp

4) What is the keyword is used to create write property in C#.NET?
  1. write
  2. put
  3. save
  4. set

5) There are following statements are given below, which of them are correct about properties in C#.NET?
  1. A property can be read and write simultaneously.
  2. A property can be either read or write-only.
  3. To create a write-only property we should use only to get accessor.
  4. To create a write-only property we should use only set accessor.

Options:

  1. Only A
  2. Only B
  3. A and D
  4. B and C







Comments and Discussions

Ad: Are you a blogger? Join our Blogging forum.





Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates


© https://www.includehelp.com some rights reserved.