StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Restrict access for BusinessLayer Object...Expand / Collapse
Author
Message
Posted 04/09/2008 6:20:03 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/27/2008 2:00:26 AM
Posts: 152, Visits: 459
I have an Business Base class that is inhereted from BusinessLayer. I want to restrict some of them and not to see when dealing with my Business Base.

I have overriden some methods then made private. But It does not work. Because I ve got "virtual and abstract methods can not be private."message.

What is the best way ?

Post #15462
Posted 04/09/2008 9:21:05 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:52:53 AM
Posts: 4,586, Visits: 4,571
What is the best way ?

You can't change the declaration type of a property, event, or method.  If you want to hide it, then your only option would be to add an attribute like <Browsable(False)> _ to prevent it from showing up in the designer.  There are other attributes as well depending on what you are trying to accoimplish, but you cannot turn a public into a private, etc.  That totally violates object oriented programming and you will have downstream issues.

Post #15463
Posted 04/09/2008 9:25:30 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/27/2008 2:00:26 AM
Posts: 152, Visits: 459
Thanks.
Post #15464
Posted 04/09/2008 9:27:16 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:52:53 AM
Posts: 4,586, Visits: 4,571
No problem
Post #15467
Posted 04/10/2008 1:42:06 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: 09/27/2008 2:00:26 AM
Posts: 152, Visits: 459
C# : [EditorBrowsable(EditorBrowsableState.Never)] attribute should be used.

There is a link which solves my problem. I 've done the same mistake.

http://groups.google.com/group/microsoft.public.dotnet.framework.windowsforms.controls/browse_thread/thread/2f88b987be3948d0?fwc=1

Post #15493
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 7:53am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.141. 10 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.