Useful Types

After learning how to work with .NET classes in your PerlNET programs, it is a good idea to introduce the most useful types and classes.

Enumerations

Enumeration types are used to define a set of named constants with common ground, such as days of week, file attributes. Constants that are defined in an enumeration are also called enumeration members. Namespaces inside components may expose enumerations. In PerlNET, we can access these constants (enumeration members) using the enum helper function, which we import from the PerlNET module. We should supply this function with one argument, fully qualified constant name, in the following format:

"namespace.enumeration.constant"

If you specified namespace by the use namespace pragma, ...

Get Programming PERL in the .NET Environment now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.