Book Image

Getting Started with Powershell

Book Image

Getting Started with Powershell

Overview of this book

Table of Contents (19 chapters)
Getting Started with PowerShell
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Next Steps
Index

What are members?


Members are the attributes of types that are implemented in classes and instantiated in objects. Members come in many forms in the .NET framework, including properties, methods, and events.

Properties represent the data contained in an object. For instance, in a FileInfo object (System.IO.FileInfo), there would be properties referring to the filename, file extension, length, and various DateTime values associated with the file. An object referring to a service (of the System.ServiceProcess.ServiceController type) would have properties for the display name of the service and the state (running or not).

Methods refer to the operations that the objects (or sometimes classes) can perform. A service object, for instance, can Start and Stop. A database command object can Execute. A file object can Delete or Encrypt itself. Most objects have some methods (for example, ToString and Equals) because they are of the System.Object type.

Events are a way for an object to notify that...