Access modifier Public in exe assemblies

  • Thread starter N Khan via .NET 247
  • Start date
N

N Khan via .NET 247

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
 
J

Jon Skeet [C# MVP]

N Khan via .NET 247 said:
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.
 
G

Guest

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
 
J

Jon Skeet [C# MVP]

njk786 said:
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top