1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Typecasting objects to doubles

Discussion in 'C#' started by Rocket452, Apr 7, 2008.

  1. Rocket452

    Rocket452 New Member

    Joined:
    Apr 3, 2008
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    0
    So I've got an array of objects that return a number of seconds based upon a SQL query.

    Code:
    static ArrayList returnValueArray3 = new ArrayList();
    I want to convert the values in this arrray through a method that will convert it into an easy to read format. (something like hrs/min/sec or something like that.)

    I tried using this, and similiar methods:

    Code:
    TimeSpan.FromSeconds(returnValueArray3[i])
    the problem is that I have an array of objects and I need to cast them to something like a double. I've tried several things to try and cast, but nothing has worked.
     
  2. praspam

    praspam New Member

    Joined:
    Feb 22, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    0
    TimeSpan.FromSeconds(double.parse(returnValueArray3))
     

Share This Page