Is it possible to have different access modifiers on the get/set methods of a property in C#?
Submitted by: AdministratorNo. The access modifier on a property applies to both its get and set accessors. What you need to do if you want them to be different is make the property read-only (by only providing a get accessor) and create a private/internal set method that is separate from the property.
Submitted by: Administrator
Submitted by: Administrator
Read Online C# (Sharp) Programming Language Job Interview Questions And Answers
Top C# (Sharp) Programming Language Questions
☺ | What is a delegate in C#? |
☺ | What is the difference between const and static read-only? |
☺ | Why would you use untrusted verification? |
☺ | Which control cannot be placed in MDI? |
☺ | What does the parameter Initial Catalog define inside Connection String? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |