TOC PREV NEXT INDEX


CHOICE Value Specification



A CHOICE value specification causes a readonly static instance of the C# class generated for the CHOICE to be generated.

ASN.1 production:

	<name> <ChoiceType> ::= elemname : <elemvalue>
 

Generated C# constants:

public static readonly <ChoiceType> <name> =
new <ChoiceType> ( <ElemCode>,
new <ElemType> (<elemvalue>));

For example, consider the following declaration:

	ChoiceType ::=  CHOICE { oid OBJECT IDENTIFIER, id INTEGER }
 

 
	value ChoiceType ::= id: 1
 

This would result in the following C# constant being generated:

	public static readonly ChoiceType value = 
 
	   new ChoiceType (ChoiceType._ID, 		new Asn1Integer(1));
 

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