0

Looking in the Object Browser in Microsoft Visual Studio 2017, I can see that some assemblies have Properties namespaces, including some assemblies that I have made myself. We can see this in Telerick's TelerickData DLL as shown in the image below. None of these namespaces that I have seen to date have any contents publicly available, nor have any further information other than the name of the namespace (e.g. Namespace TelerickData.Properties) and the name of the assembly that it is a member of (e.g. Member of TelerikData)

Some assemblies do not display this namespace, such as some other Telerik DLLs or any of the framework DLLs.

What is the purpose of this namespace? Can I remove it, hide it or make it private, for my own C# DLL? Should I?

DLL namespace listing in Object Browser showing empty Properties namespace

Toby
  • 9,696
  • 16
  • 68
  • 132

1 Answers1

1

It is usually the place for the auto-generated designer classes of the Resources and Settings which by default belong to Properties namespace. The reason you do not see them outside of the library is probably due to their internal access modifier. Here is another answer on the internal only classes in the namespace.

Eugene Komisarenko
  • 1,533
  • 11
  • 25
  • Thanks, I see the Properties namespace now in `Resources.Designer.cs`. I guess I need to figure out how to correctly remove that (I have no resources anymore but removing the ones I had caused headaches with the `.csproj` file) – Toby Aug 16 '17 at 11:18
  • Unless you use Resources/Settings you can simply remove the actual .resx and .settings files from the project, rebuild your solution and check it again. Without any classes, namespace will be gone. – Eugene Komisarenko Aug 16 '17 at 11:21
  • Excellent! Solves both problems and the answer you linked helps with what would have been my next question about hiding namespaces for internal only classes. One green tick for you sir. – Toby Aug 16 '17 at 11:32