aboutsummaryrefslogtreecommitdiff
path: root/cs-dotnet/src/tests/ints.cs
blob: 680bda540ef3c2fbac6309c8192582479c07ef2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*
 * Copyright (C) 2007-2012 Xagasoft, All rights reserved.
 *
 * This file is part of the libgats library and is released under the
 * terms of the license contained in the file LICENSE.
 */

using System;
using System.Globalization;
using System.IO;
using Com.Xagasoft.Gats;

class Ints
{
    static void Main()
    {
        FileStream file = new FileStream("test.gats", FileMode.Open,
                FileAccess.Read );
        GatsObject obj = GatsObject.Read( file );
        Console.WriteLine("Read type: " + obj.GetType() );
        Console.WriteLine("Read int: " + ((GatsInteger)obj).Value );

        Console.WriteLine("Float? " + double.Parse("0x1.62e42fefa39efp+2") );
    }
}