Reputation: 659
Is it possible to specify different access modifiers for property getter and setter using C++/CLI syntax? In C# one would write:
class Foo
{
public string Bar
{
get;
internal set;
}
}
Upvotes: 14
Views: 6847
Reputation: 37955
This should do:
public:
property String^ Bar
{
String^ get();
private:
void set(String^);
}
(Edited following Hans Passant's comment).
Upvotes: 22