.NET Types and PerlNET

The .NET types that we use in PerlNET may be divided into two major groups: value types and reference types. Value type variables store the value itself, while reference type variables store a reference (an address in memory where the data is located). References are useful for compound types, and usually we use them to work with instances of .NET class types—objects.

Whenever a .NET method returns an object, PerlNET stores a reference to it unless this object represents one of the value types: System.Int32, System.Double, System.Decimal, and so on. Here are the .NET value types of our interest (they all reside in the System namespace):

  • Boolean

  • Char

  • SByte

  • Int16

  • Int32

  • Int64

  • Byte

  • UInt16

  • UInt32

  • UInt64

  • Single

  • Double

  • Decimal

PerlNET stores ...

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.