ATTENTION: I've decided to put the upgrade on hold due to a compatibility issue of our server environment with the latest CS installer package. CS 2008 now requires SQL Server 2005 as the backend DB but our database server currenlty has SQL Server 2000 installed on it. I'll resume the upgrade once I figure out when Telligent is releasing a patch to the schema compatibility issue. For now, we will continue to use the old version of CS while waiting for the said patch. If you have any questions about this process, please don't hesitate to post them on our forums and I'll answer them as soon as I can. Thanks for your patience and support guys! I'll let you know as soon as this is resolved. - Keith Rull

Asymmetric Accessor Accessibility

Seems like i learn something new everyday...

public string Name
{
   get
   {
      return name;
   }
   protected set
   {
      name = value;
   }
}

I never knew that i could put an accessibility level to the 'set' portion of my property. This technique is called Asymmetric Accessor Accessibility. Read more here.


Posted Jan 02 2007, 04:53 PM by keithrull

Comments

cruizer wrote re: Asymmetric Accessor Accessibility
on 01-02-2007 5:26 PM

ok yan ah! he he matagal ko nang hinahanap paano ko magagawang yun set property eh limited lang ang may access. ganito pala. :) thanks keith!

keithrull wrote re: Asymmetric Accessor Accessibility
on 01-02-2007 7:53 PM

youre welcome cruizer!

yeah! it stunned me to death too, and i'm loving it! :)

lamia wrote re: Asymmetric Accessor Accessibility
on 01-02-2007 9:35 PM

So that means na ang default access level ng get/set sa .Net is public?

cruizer wrote re: Asymmetric Accessor Accessibility
on 01-03-2007 12:18 AM

nope. it just means the default for the get/set is to take the level assigned to the property (in Keith's example, it's "public")

cvega wrote re: Asymmetric Accessor Accessibility
on 01-03-2007 6:09 PM

Property and/or Event accessors are new to .NET 2.0, so people coming from .NET 1.0 would normally won't aware of its existence.

-chris

cvega wrote re: Asymmetric Accessor Accessibility
on 01-04-2007 1:32 AM

I mean, accessors' access modifier.

-chris

Add a Comment

(required)  
(optional)
(required)  
Remember Me?

Enter the numbers above:

Copyright DevPinoy 2005-2008