Chapter 4

Accessing the Internet

IN THIS CHAPTER

check Taking a tour of the System.Net namespace

check Using built-in tools to access the network

check Making the network tools work for you

The reason that Microsoft had to create the .NET Framework in the first place was the lack of Internet interoperability within its existing infrastructure. The Component Object Model (COM) just couldn’t handle the Internet. The Internet works differently than most platforms, such as PCs. The Internet is based on protocols — carefully defined and agreed upon ways to get things like mail and file transfers working. Microsoft’s environment before 2002 distinctly didn’t handle those as well.

As you can see throughout this book, the .NET Framework is designed from the ground up to take the Internet and networking in general into consideration. Not surprisingly, that is nowhere more clear than it is in the System.Net namespace. The Internet takes first chair here, with web tools taking up nine of the classes in the namespace.

In version 4.7 of the .NET Framework (the one that ships with Visual Studio 2017), even more Internet functionality is baked in. Although in version 1.x the focus was on tools used to build other ...

Get C# 7.0 All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.