Report Manager Documentation

Variant Structure

Implementation of a Variant type with common arithmetic and logic operations. Variant is a container, not a class reference, that is when you assign a variant to another variant, you are copying content, just like you work with base types like int, char, string. The Variant type is a useful feature to implement an expression evaluator.

For a list of all members of this type, see Variant Members.

System.Object
   System.ValueType
      Reportman.Reporting.Variant

public struct Variant

Thread Safety

This type is safe for multithreaded operations.

Remarks

C# is a strongly typed language, this feature minimize runtime errors common on implicit variable declaration (Visual Basic), however, at runtime, the requirements of an application can require the feature of operating with unknown/variable data types. Expression evaluation involving variable database fields is an example. Use only Variant type if your aplication requires this abstraction else it's better to use singular types.

Example

Variant a=12;
Variant b=13;
Variant c=a+b;
Variant d="The result is:";
d=d+c.ToString();

Requirements

Namespace: Reportman.Reporting

Assembly: printreport (in printreport.exe)

See Also

Variant Members | Reportman.Reporting Namespace