Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / March 2005

Tip: Looking for answers? Try searching our database.

Internal visibility

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TT (Tom Tempelaere) - 08 Mar 2005 13:03 GMT
Hi everyone,

How do I set the visibility of a member in managed c++ to internal (I'm used
to using it in C#, but can't find in C++.NET)

Thanks,
Signature

Tom Tempelaere.

William DePalo [MVP VC++] - 08 Mar 2005 16:08 GMT
> How do I set the visibility of a member in managed c++ to internal (I'm
> used
> to using it in C#, but can't find in C++.NET)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vcmxspec/html/v
cManagedExtensionsSpec_21_2.asp


Regards,
Will
TT (Tom Tempelaere) - 08 Mar 2005 16:25 GMT
Thanks William,
Tom Tempelaere.
TT (Tom Tempelaere) - 08 Mar 2005 17:13 GMT
Hey,

#define __internal public private

Perhaps not very good style in regular C++, but a lot easier to know the
visibility. I know that two leading underscores is a no-go in standard C++,
but I'm not very fond of mixing visibility (access-) specifiers (it's plain
ugly I think).

Cheers,
Tom Tempelaere.
TT (Tom Tempelaere) - 08 Mar 2005 17:15 GMT
> Hey,
>
> #define __internal public private

Now if only I could get the '__internal' to show up in blue in my source
code, like other managed C++ keywords (like __sealed and __gc)...

Tom Tempelaere.
William DePalo [MVP VC++] - 08 Mar 2005 18:00 GMT
> Now if only I could get the '__internal' to show up in blue in my source
> code, like other managed C++ keywords (like __sealed and __gc)...

This is not something that I have tried so take what follows with a grain of
salt.

This was possible with VC++ 6.0. When I searched the MSDN, I found
instructions for the old IDE and this link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/html/v
xtskDefiningKeywordsInVisualC.asp?frame=true


which I think applies to VS.Net 2005.

I don't know if it works with the current version. Perhaps one of the MS
guys will set us straight.

Regards,
Will
ismailp - 08 Mar 2005 18:38 GMT
internal keyword works on whidbey. there is no leading __ stuff (i.e.
not __internal).

class A
{
internal:
  void f(){}
}

when you write "public private" or "private public", compiler generates
a warning saying that "public private is deprecated, use internal".
intellisense on beta1 does not highlight internal keyword with blue
color like it does on public, private or other reserved words.

ismail
TT (Tom Tempelaere) - 09 Mar 2005 14:15 GMT
Hi,

All very interesting things. Thanks for the info.

Tom.

> internal keyword works on whidbey. there is no leading __ stuff (i.e.
> not __internal).
[quoted text clipped - 9 lines]
> intellisense on beta1 does not highlight internal keyword with blue
> color like it does on public, private or other reserved words.
TT (Tom Tempelaere) - 09 Mar 2005 14:17 GMT
Hey William,

It works!!! Cool, thanks :D

Tom T.

> > Now if only I could get the '__internal' to show up in blue in my source
> > code, like other managed C++ keywords (like __sealed and __gc)...
[quoted text clipped - 14 lines]
> Regards,
> Will

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.