Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restricted access to a class
Message
From
25/05/2012 13:49:00
 
 
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
VB 9.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01544358
Message ID:
01544427
Views:
19
>If you want to hide it completely then you must mark it private. In that case you would have to explicitly expose members to the outside world. ie. you end up with something like this:
Public Class Upload
>	Friend Sub New()
>	End Sub
>	Friend Property SomeProperty() As String
>		Get
>			Return m_SomeProperty
>		End Get
>		Set
>			m_SomeProperty = Value
>		End Set
>	End Property
>	Private m_SomeProperty As String
>
>	Friend Function DoSomething(s As String) As String
>	End Function
>End Class
>
>Public Class PublicClass
>	Private oUpload As New Upload()
>
>	Public Property SomeProperty() As String
>		Get
>			Return oUpload.SomeProperty
>		End Get
>		Set
>			oUpload.SomeProperty = value
>		End Set
>	End Property
>
>	Public Function DoSomething(s As String) As String
>		Return oUpload.DoSomething(s)
>	End Function
>End Class
Ah, the famous Get/Set approach, thanks for the info
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Reply
Map
View

Click here to load this message in the networking platform