Property Block Accessibility

  • Thread starter Thread starter Mike Labosh
  • Start date Start date
M

Mike Labosh

In C# 2003, is there a way to phrase a property block so that the getter is
public and the setter is internal?

How about in 2005?

--
Peace & happy computing,

Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"The power to query ADSI is a power only
one has achieved, but if we work together,
I know we can discover the secrets."
-- The Emperor
 
In C# 2003, is there a way to phrase a property block so that the getter is
public and the setter is internal?

How about in 2005?

Not in C# 1, I'm afraid. Fortunately this glaring omission was
corrected in C# 2:

int foo;
public int Foo
{
get { return foo; }
internal set { foo = value; }
}
 
Not in C# 1, I'm afraid. Fortunately this glaring omission was
corrected in C# 2:

int foo;
public int Foo
{
get { return foo; }
internal set { foo = value; }
}

Excellent. Thanks!
--
Peace & happy computing,

Mike Labosh, MCSD MCT
Owner, vbSensei.Com
"The power to query ADSI is a power only
one has achieved, but if we work together,
I know we can discover the secrets."
-- The Emperor
 

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