The ASN.1 REAL type is converted to a C# class that inherits the Asn1Real run-time class. This base class encapsulates the following public member variable:
public double mValue;
This is where the real value to be encoded is stored. It also contains the result of a decode operation. Since it is public, it can be accessed directly to get or set the value. The generated constructors can also be used to set the value.
The following shows the basic mapping from ASN.1 type to C# class definition:
ASN.1 Production: |
<name> ::= REAL |
XSD Types: |
<xsd:float>, <xsd:double> |
Generated C# class: |
public class <name> : Asn1Real { public <name> () : base() { } public <name> (double value_) : base (value_) { } } |
This shows the class generated for a simple REAL assignment. If a tagged or constrained type is specified, specific encode and decode methods will be generated as well.