Home > Articles > Programming > Windows Programming

  • Print
  • + Share This
This chapter is from the book

Utility Objects

The class Console provides functions for performing input and output to a console window. It's useful for debugging and development, and any functionality for which a full Windows interface is overkill.

The class Convert provides static methods for converting a variable of one base type into another base type, such as Int32 to Double.

The class GC provides a connection to the garbage collector in the automatic memory management system. It contains methods such as Collect, which forces an immediate garbage collection.

The utility class Environment provides access to environment variables, and other environment properties such as machine name.

The class MarshalByRefObject is the abstract base class for objects that communicate across application domain boundaries by exchanging messages using a proxy. Classes must inherit from MarshalByRefObject when the type is used across application domain boundaries, and the state of the object must not be copied because the members of the object are not usable outside the application domain where they were created.

The class Math provides access to mathematical operations such as trigonometric and logarithmic functions.

The class Random provides methods that generate a sequence of random numbers, starting from a specified seed. You should use specialized cryptographic functionality (in the System.Security.Cryptography namespace) for random number generation for cryptographic purposes.

The class Type is the basis for all reflection operations. Think of it as a class descriptor.

The class Version represents a dotted quad version number (major, minor, build, revision). It is used in the utility functions that specify versioning behavior of assemblies.

  • + Share This
  • 🔖 Save To Your Account