|
-
Oct 18th, 2002, 03:51 PM
#1
*resolved* dumb dumb dumb question - protected
I know this has been asked 1010100100202039028 times, but I DONT GET IT!!!!! 
What's the difference between these two:
VB Code:
Public Class A
[COLOR=RED][b]Protected[/b][/color] Class B
End Class
End Class
and
VB Code:
Public Class A
[COLOR=RED][b]Private[/b][/color] Class B
End Class
End Class
I dont know what Friend, Protected, or Protected Friend means MSDN doesnt help neither, maybe I'm too dumb or whatever, but someone plz explain this
Last edited by MrPolite; Oct 19th, 2002 at 12:40 AM.
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 18th, 2002, 04:08 PM
#2
Friend is Public to anything in the same project otherwise it is treated as Private. Protected is somewhat like that only instead of Public to the Project it is Public to the class and any class derived from that class.
-
Oct 18th, 2002, 05:08 PM
#3
PowerPoster
From a book:
Public - Can be accessed from anywhere.
Private - Can be accessed only by members within the type that defines it.
Friend - Can be accessed form all types within the assembly, but not from outside the assembly.
Protected - Can be accessed only by members within the type that defines it or types that inherit from that type.
Protected Friend - Can be accessed from all types within the assembly or from types inheriting from the owning type. This is the union of Protected and Friend access.
-
Oct 18th, 2002, 09:17 PM
#4
ok, kinda get it 
just what does it mean when it says "within the assembly"? what's an assembly?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 18th, 2002, 09:48 PM
#5
An assembly is an exe or dll whatever the project basically is.
-
Oct 18th, 2002, 11:41 PM
#6
Originally posted by Edneeis
An assembly is an exe or dll whatever the project basically is.
hmm, so if you have two projects in one solution, and you have a Friend variable, it an be only accessed in one of the project?
rate my posts if they help ya!
Extract thumbnail without reading the whole image file: (C# - VB)
Apply texture to bitmaps: (C# - VB)
Extended console library: (VB)
Save JPEG with a certain quality (image compression): (C# - VB )
VB.NET to C# conversion tips!!
-
Oct 19th, 2002, 12:19 AM
#7
Yes just like groups in VB6, in fact Friend isn't new with .NET we had it in VB6, too.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|