0

Class, what is "same assembly" mean related to internal access specifier? Give me a concrete example?

20th Dec 2022, 4:11 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
4 Réponses
0
Does internal access has similar level to package access in Java?
20th Dec 2022, 4:12 AM
Oliver Pasaribu
Oliver Pasaribu - avatar
0
The assembly name of a .NET project is the name of the compiled executable file or DLL that is generated when the project is built. It is typically specified in the project file using the <AssemblyName> element. If the assembly name is not explicitly specified, the default assembly name will be used, which is typically the same as the name of the project file with the ".exe" or ".dll" extension. For example, if the project file is named "MyProject.csproj", the default assembly name will be "MyProject.exe" or "MyProject.dll" depending on the value of the <OutputType> element. You can specify a custom assembly name for a project by adding an <AssemblyName> element to the project file. For example: <AssemblyName>MyCustomAssemblyName</AssemblyName> This will change the name of the generated executable or DLL to "MyCustomAssemblyName.exe" or "MyCustomAssemblyName.dll", respectively. The "internal" access specifier is used to restrict the visibility of a type or member to within the same assembly. This means that the type or member can only be accessed by other types and members that are defined in the same assembly.
20th Dec 2022, 6:57 AM
Calvin Lee
Calvin Lee - avatar
0
Both "internal" in .NET and "package" in Java allow a type or member to be accessed only within the same compiled unit of code (assembly in .NET, package in Java).
20th Dec 2022, 6:59 AM
Calvin Lee
Calvin Lee - avatar
0
I see. You are talking about desktop version of languages like visual c# with complete GUI. I haven't found the complete android version of Java, visual c, event c#.
20th Dec 2022, 7:10 AM
Oliver Pasaribu
Oliver Pasaribu - avatar