TOC PREV NEXT INDEX


INTEGER



The ASN.1 INTEGER type is converted to a C# class that inherits the Asn1Integer run-time class. This base class encapsulates the following public member variable:

    public long mValue;
 

This is where the integer 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> ::= INTEGER


 
Generated C# class:

public class <name> : Asn1Integer {
 
   public <name> () : base() {
 
   }
 
   public <name> (long value_) : base(value_) {
 
   }
 
}


 


This shows the class generated for a simple INTEGER assignment. If a tagged or constrained type is specified, specific encode and decode methods will be generated as well.


Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX

Copyright © 1997-2005 Objective Systems,Inc.
All Rights Reserved.


This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.