Follow the steps below to build any application, including the samples.
using Oss.Asn1; using BCAS.BCASModule; using BCAS; namespace BCASApp public class Program { public static void Main() { BerCodec codec = new BerCodec(); MemoryStream stream = new MemoryStream(); BBCard pdu = new BBCard(); try { // init PDU pdu.Name = "Casey"; pdu.Team = "Mudville Nine"; pdu.Age = 32; pdu.Position = "left field"; pdu.Handedness = BBCard.HandednessType.Ambidextrous; pdu.BattingAverage = 0.25; // encode PDU codec.Encode(pdu, stream); // move stream position to beginning for decoding stream.Position = 0; // decode PDU codec.Decode(stream, pdu); // print PDU Console.WriteLine(pdu); } catch (Exception ex) { Console.WriteLine("Codec exception:" + ex); } } } }
The sample files included with the software are installed in %ProgramData%\OSS Nokalva\asn1csharp\<platform name>\<version>\samples.
This documentation applies to the OSS® ASN.1 Tools for C# release 5.3 and later.
Copyright © 2024 OSS Nokalva, Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise, without the prior permission of OSS Nokalva, Inc.
Every distributed copy of the OSS® ASN.1 Tools for C# is associated with a specific license and related unique license number. That license determines, among other things, what functions of the OSS ASN.1 Tools for C# are available to you.