Re: C++ friend class equivalent
- From: "Davis" <Davis_xx65@xxxxxxxxxxx>
- Date: Tue, 20 Jun 2006 16:11:16 +0100
Hi Chris, the internal keyword is equivalent to Friend in VB but
this is not what i want. internal allows that class or method
to be accessed outside the class but within the assembly.
I want to give an external class access to private methods in
my class, just as the friend keyword does in C++
c++ class
ie class A{
friend class B;
-----
}
here class B has access to all of A's private members and methods.
'internal' alows a member or method to be accessed outside class A
c# class
class A{
internal int var;
}
so its just a restricted version of public
I am new to CF but as AFAIK internal (C#) or Friend(VB)
is not the same as friend i nC++ which is what i want.
Also i don't want to make all my members and methods public or internal in
my class.
Hope this clarifies for you.
"<ctacke/>" <ctacke[@]opennetcf[dot]com> wrote in message
news:uCz8CbHlGHA.4200@xxxxxxxxxxxxxxxxxxxxxxx
it's internal in C#, so probably Internal in VB
-Chris
"Davis" <Davis_xx65@xxxxxxxxxxx> wrote in message
news:%23q1TAwGlGHA.4284@xxxxxxxxxxxxxxxxxxxxxxx
Hi, In VB if i want to define a class that has access to private
elements of another class how do i declare it. In C++ you
just use friend keyword.
As far as i understand the Friend keyword in VB allows that
particular element to be accessed outside the class but within an
assembly
which is not what i'm after.
Thanks
.
- Follow-Ups:
- Re: C++ friend class equivalent
- From: Norman Rericha
- Re: C++ friend class equivalent
- References:
- C++ friend class equivalent
- From: Davis
- Re: C++ friend class equivalent
- From: <ctacke/>
- C++ friend class equivalent
- Prev by Date: explicitly define which assemblies are deployed where on a device
- Next by Date: Re: Location of tray icon is blocked
- Previous by thread: Re: C++ friend class equivalent
- Next by thread: Re: C++ friend class equivalent
- Index(es):
Relevant Pages
|