469,356 Members | 2,249 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,356 developers. It's quick & easy.

Access modifier Public in exe assemblies

Hi,

I know the usage of access modifier ?public? in DLL assembliesbut I am a bit puzzled that if let say I have a public class inan exe assembly then what purpose access modifier ?public? willserver. Related to the same thing is it possible that we canexpose exe assembly like DLL assembly.

Cheers

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>p7rsZMJSYEKKt7NbDTtJeA==</Id>
Jul 21 '05 #1
3 1600
N Khan via .NET 247 <an*******@dotnet247.com> wrote:
I know the usage of access modifier ?public? in DLL assemblies but I
am a bit puzzled that if let say I have a public class in an exe
assembly then what purpose access modifier ?public? will server.
Related to the same thing is it possible that we can expose exe
assembly like DLL assembly.


You can actually reference a .exe file in the same way you can a .dll
file as far as the CLR is concerned - and the C# compiler (for example)
is fine to do that. VS.NET doesn't support it though.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #2
Hi Thanks Jon can you answer first part of my question i.e. what will be the
behaviour of access modifier 'public' in an exe assembly especially when you
say that we can reference it.

cheers

"Jon Skeet [C# MVP]" wrote:
N Khan via .NET 247 <an*******@dotnet247.com> wrote:
I know the usage of access modifier ?public? in DLL assemblies but I
am a bit puzzled that if let say I have a public class in an exe
assembly then what purpose access modifier ?public? will server.
Related to the same thing is it possible that we can expose exe
assembly like DLL assembly.


You can actually reference a .exe file in the same way you can a .dll
file as far as the CLR is concerned - and the C# compiler (for example)
is fine to do that. VS.NET doesn't support it though.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too

Jul 21 '05 #3
njk786 <nj****@discussions.microsoft.com> wrote:
Hi Thanks Jon can you answer first part of my question i.e. what will be the
behaviour of access modifier 'public' in an exe assembly especially when you
say that we can reference it.


It's exactly the same as it is in a DLL - other assemblies are able to
"see" public members.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Dan Disney | last post: by
3 posts views Thread by Chua Wen Ching | last post: by
3 posts views Thread by N Khan via .NET 247 | last post: by
5 posts views Thread by wpmccormick | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.