ReadDouble() public method

Reads a field as a double.
 if the index does not correspond to a field
public ReadDouble ( int index ) : double
index int the index of the field to read
return double
コード例 #1
0
        public void TestReadDoubleName()
        {
            var fieldSet = new DefaultFieldSet(new[] { "name" }, new[] { "2.37" });

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

            Assert.AreEqual(2.37D, read);
        }
コード例 #2
0
        public void TestReadDoubleIndex()
        {
            var fieldSet = new DefaultFieldSet(new[] { "2.37" });

            var read = fieldSet.ReadDouble(0);

            Assert.AreEqual(2.37D, read);
        }