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
 
Back
Top