ReadFloat() public method

Reads a field as a float.
 if the index does not correspond to a field
public ReadFloat ( int index ) : float
index int the index of the field to read
return float
Exemplo n.º 1
0
        public void TestReadFloatName()
        {
            var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "2.37" });

            var read = fieldSet.ReadFloat("name");

            Assert.AreEqual(2.37F, read);
        }
Exemplo n.º 2
0
        public void TestReadFloatIndex()
        {
            var fieldSet = new DefaultFieldSet(new[] { "2.37" });

            var read = fieldSet.ReadFloat(0);

            Assert.AreEqual(2.37F, read);
        }