different modifier for get and set

  • Thread starter Thread starter bhavin
  • Start date Start date
B

bhavin

hi,
can i have different access levels for the get and set of a property
example property Color, can i make the get public, and set protected?

bh
 
bh,

In .NET 1.1, this was not possible, however, it will be possible in .NET
2.0.

Hope this helps.
 
thanx nicholas

Nicholas Paldino said:
bh,

In .NET 1.1, this was not possible, however, it will be possible in ..NET
2.0.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

bhavin said:
hi,
can i have different access levels for the get and set of a property
example property Color, can i make the get public, and set protected?

bh
 
minor correction. in C# 1.0, this is not possible. C# 2.0 will introduce
new syntax to support this.

Nicholas Paldino said:
bh,

In .NET 1.1, this was not possible, however, it will be possible in .NET
2.0.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

bhavin said:
hi,
can i have different access levels for the get and set of a property
example property Color, can i make the get public, and set protected?

bh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top