예제 #1
0
    /*public virtual void writeFloat32(double @value)
    {

        seek();
        float tmp = (float)value;
        writer.Write(value);

    }*/
    void TestData()
    {
        var data = new types.Data (4);
        data.writeFloat32 (1.1);
        data.memory.Seek (0, System.IO.SeekOrigin.Begin);
        string str = "";
        for (int i = 0; i < 4; i++)
        {
            str  += data.reader.ReadByte().ToString("X") + " ";
        }
        System.Console.Write (str);
    }
예제 #2
0
    /*public virtual void writeFloat32(double @value)
     * {
     *
     *      seek();
     *      float tmp = (float)value;
     *      writer.Write(value);
     *
     * }*/

    void TestData()
    {
        var data = new types.Data(4);

        data.writeFloat32(1.1);
        data.memory.Seek(0, System.IO.SeekOrigin.Begin);
        string str = "";

        for (int i = 0; i < 4; i++)
        {
            str += data.reader.ReadByte().ToString("X") + " ";
        }
        System.Console.Write(str);
    }