Do they load all the program code into the memory on application startup?
You can have as many Assemblies in your project as you need. Assemblies are referenced via the
using keyword. Unused assemblies are filtered out at the build time itself. For example, you can have two referenced asssemblies as:
If you haven't used assembly
System.Windows.Forms, it will not affect the performance of your code but it may affect compile time and Intellisense performance.
See this StackOverflow question for unused usings.
Referenced assemblies are not immediately loaded - they are loaded on the fly as needed. So regardless of whether you have an assembly reference in a top level project, or a dependent assembly of assemblies, assemblies are typically load on an as needed basis, unless explicitly loaded by user code. The same is true of dependent assemblies.
See When does a .NET Assembly Dependency get loaded for more info.
The classes in any assembly are loaded only when they are used. Not all the classes will be loaded at once in the memory. Even static classes are loaded in the main memory when they are first referenced. So having bulk of unused classes in your assembly will not degrade the performance but will increase the hard disk space required(not memory requirements).
So the simple answer is NO.