Class properties

So, your constructors give you a clear idea of the context in which the classes are expected to be used, and your properties define the overall shape of a request. They define the clearest and most unambiguous description of what the class actually is. What can we learn about WebRequest, based on its properties? Well, let's take a closer look.

According to the base class specification, the public properties of the class are in alphabetical order ( as they're listed in the Microsoft documentation, here: https://docs.microsoft.com/en-us/dotnet/api/system.net.webrequest?view=netcore-3.0), as follows:

  • AuthenticationLevel
  • CachePolicy
  • ConnectionGroupName
  • ContentLength
  • ContentType
  • Credentials
  • DefaultCachePolicy
  • DefaultWebProxy ...

Get Hands-On Network Programming with C# and .NET Core 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.