Skip to Main Content
C# 10.0 All-in-One For Dummies
book

C# 10.0 All-in-One For Dummies

by John Paul Mueller
March 2022
Intermediate to advanced content levelIntermediate to advanced
864 pages
19h 46m
English
For Dummies
Content preview from C# 10.0 All-in-One For Dummies

Chapter 9

Can I Use Your Namespace in the Library?

IN THIS CHAPTER

Bullet Dealing with separately compiled assemblies

Bullet Writing a class library

Bullet Using more access-control keywords

Bullet Working with namespaces

C# gives you a variety of ways to break code into meaningful, workable units. These methods include programmatic breaks, such as methods and classes, and structural breaks, such as libraries, assemblies, and namespaces.

You can use a method to divide a long string of code into separate, maintainable units. Use the class structure to group both data and methods in meaningful ways to further reduce the complexity of the program. This chapter also discusses use of partial classes and partial methods to break up things even further. Programs are complex already, and humans become confused easily, so we need all the help we can get.

C# provides another level of grouping: You can group similar classes into a separate library. Beyond writing your own libraries, you can use anybody’s libraries in your programs. These programs contain multiple modules known as assemblies. This chapter describes libraries ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

C# Cookbook

C# Cookbook

Joe Mayo
Head First C#, 4th Edition

Head First C#, 4th Edition

Andrew Stellman, Jennifer Greene

Publisher Resources

ISBN: 9781119839071Purchase Link