By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,685 Members | 1,326 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,685 IT Pros & Developers. It's quick & easy.

Friend Class

P: n/a
Hi,
Is there any difference between a "friend method" in "friend class" and a "public method" in "friend class"?

Rahul
Nov 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
"Rahul Johri" <ra*********@induslogic.com> schrieb
Hi,
Is there any difference between a "friend method" in "friend
class" and a "public method" in "friend class"?
Yes, a Friend method can only be accessed in the same assembly whereas a
Public method can also be accessed from other projects/assemblies.
--
Armin

Nov 20 '05 #2

P: n/a
Rahul,
Is there any difference between a "friend method" in "friend class" and a "public method" in "friend class"?


Not really, either way the method will only be accessible to types in
the same assembly.

Mattias

--
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/
Please reply only to the newsgroup.
Nov 20 '05 #3

P: n/a
"Armin Zingler" <az*******@freenet.de> schrieb
"Rahul Johri" <ra*********@induslogic.com> schrieb
Hi,
Is there any difference between a "friend method" in "friend
class" and a "public method" in "friend class"?
Yes, a Friend method can only be accessed in the same assembly
whereas a Public method can also be accessed from other
projects/assemblies.


Aahh sorry, Mattias is right. I didn't read carefully enough. Ignore my
reply.
--
Armin

Nov 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.