Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. put data in array

put data in array

Scheduled Pinned Locked Moved ASP.NET
data-structuresquestion
4 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    ptvce
    wrote on last edited by
    #1

    i wrote this cod and that is not right can you correct it?????? public static Int32[] tcode; for(int i=0;i

    E G A 3 Replies Last reply
    0
    • P ptvce

      i wrote this cod and that is not right can you correct it?????? public static Int32[] tcode; for(int i=0;i

      E Offline
      E Offline
      enjoycrack
      wrote on last edited by
      #2

      Hi there,

      ptvce wrote:

      tcode[i] = Convert.ToInt32(ds.Tables[0].Rows[i][0]);

      what is your tcode[i]? And you have to make sure that ds.Tables[0] is not null << >>

      1 Reply Last reply
      0
      • P ptvce

        i wrote this cod and that is not right can you correct it?????? public static Int32[] tcode; for(int i=0;i

        G Offline
        G Offline
        Guffa
        wrote on last edited by
        #3

        You have forgotten to create the array. --- b { font-weight: normal; }

        1 Reply Last reply
        0
        • P ptvce

          i wrote this cod and that is not right can you correct it?????? public static Int32[] tcode; for(int i=0;i

          A Offline
          A Offline
          Anish Gopi
          wrote on last edited by
          #4

          Create array as per your row count public static Int32[] tcode = new Int32[ds.tables[0].rows.count] ; for(int i=0;i<ds.tables[0].rows.count;i++) { tcode[i] = Convert.ToInt32(ds.Tables[0].Rows[i][0]); }

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups