Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6039565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T06:23:13+00:00 2026-05-23T06:23:13+00:00

I am attempting something along the line of below mentioned code. Though it works

  • 0

I am attempting something along the line of below mentioned code. Though it works in single dimension array. How to make it work with 2-d array?

Dim arrayord(,) As String = {ds.Tables(0).Rows(3).ItemArray, ds.Tables(0).Rows(23).ItemArray}

But it throws the following error.

Error 8 Value of type ‘1-dimensional array of 1-dimensional array of Object’ cannot be converted to ‘2-dimensional array of String’ because ‘1-dimensional array of Object’ is not derived from ‘String’.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T06:23:14+00:00Added an answer on May 23, 2026 at 6:23 am
    Dim dtb1 As New DataTable("Table1")
    dtb1.Columns.Add(New DataColumn("Column1", GetType(Integer)))
    dtb1.Columns.Add(New DataColumn("Column2", GetType(Integer)))
    dtb1.Columns.Add(New DataColumn("Column3", GetType(Single)))
    dtb1.Columns.Add(New DataColumn("Column4", GetType(String)))
    dtb1.Columns.Add(New DataColumn("Column5", GetType(String)))
    dtb1.Rows.Add(1, 1, 1.1, "1", "5")
    dtb1.Rows.Add(2, 2, 2.2, "2", "4")
    dtb1.Rows.Add(3, 3, 3.3, "3", "3")
    dtb1.Rows.Add(4, 4, 4.4, "4", "2")
    dtb1.Rows.Add(5, 5, 5.5, "5", "1")
    dtb1.Rows.Add(11, 11, 11, "11", "11")
    
    Dim strOutput(dtb1.Rows.Count - 1, dtb1.Columns.Count - 1) As String '(row,col)
    For intRow As Integer = 0 To dtb1.Rows.Count - 1
      For intCol As Integer = 0 To dtb1.Columns.Count - 1
        strOutput(intRow, intCol) = CStr(dtb1.Rows(intRow).Item(intCol))
      Next intCol
    Next intRow
    

    Or you could use a List(Of String()) instead of a two dimensional array:

    Dim lstOutput As New List(Of Object()) From {dtb1.Rows(0).ItemArray, dtb1.Rows(1).ItemArray, dtb1.Rows(2).ItemArray}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am attempting to create something along the lines of How to Implement Basic
I'm attempting something like the following: switch ($p) { foreach ($modules as $m) {
I am attempting to do something simple (I thought) - securing my application using
I'm attempting to do something which should be relatively simple. I'm using a ListView
I am attempting to pass a text box value into a SQL query, something
Attempting to make a NSObject called 'Person' that will hold the login details for
I have a constructor criteria query. For the constructor, I'm attempting to do something
I'm attempting something which I feel should be fairly obvious to me but it's
I have something along the lines of.. private UavControlForm() { InitializeComponent(); if (ControlFacade.CheckIfStkIsLaunched()) {
I'm attempting to use ImageMagick along w/ Paperclip to handle the images on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.