MySql.Data.MySqlClient.MySqlDataReader.GetDouble C# (CSharp) Method

GetDouble() public method

public GetDouble ( int i ) : double
i int
return double
    public override double GetDouble(int i)
    {
      IMySqlValue v = GetFieldValue(i, true);
      if (v is MySqlDouble)
        return ((MySqlDouble)v).Value;
      return Convert.ToDouble(v.Value);
    }

Same methods

MySqlDataReader::GetDouble ( string column ) : double

Usage Example

Ejemplo n.º 1
0
 public static Champion Mapper(MySqlDataReader r)
 {
     var c = new Champion();
     c.Id = r.GetInt32("Id");
     c.Name = r.GetString("Name");
     c.Title = r.GetString("Title");
     c.Stat = new Stat();
     c.Stat.Mana = r.GetDouble("Mana");
     c.Stat.ManaPerLv = r.GetDouble("ManaPerLevel");
     c.Stat.MagicResist = r.GetDouble("MagicResist");
     c.Stat.MagicResistPerLv = r.GetDouble("MagicResistPerLevel");
     return c;
 }
All Usage Examples Of MySql.Data.MySqlClient.MySqlDataReader::GetDouble