Access modifier Public in exe assemblies

  • Thread starter Thread starter N Khan via .NET 247
  • Start date 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
 
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.
 
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
 
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.
 
Back
Top