Type cast an array from int to long

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • yasirzafar
    New Member
    • Jul 2012
    • 6

    Type cast an array from int to long

    my array contains elements of integer type

    how can i convert my array to long array
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    The most obvious way would be to create a new array to hold your Longs.

    The, loop through the array of integers, cast them to longs while adding them to your new array.

    Comment

    Working...