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 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.