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 7566849
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:30:59+00:00 2026-05-30T14:30:59+00:00

I am referring one tutorial which is in php.I am converting in into C#.The

  • 0

I am referring one tutorial which is in php.I am converting in into C#.The thing is that they have used

my query in this

SELECT ST_AsText(
  ST_Union(
    ST_Difference(
      ST_Buffer(ST_GeometryFromText('POINT(0 0)', 4326), 30),
      ST_Envelope(
        ST_Buffer(ST_GeometryFromText('POINT(0 0)', 4326), 10)
      )
    ),
    ST_Envelope(
        ST_Buffer(ST_GeometryFromText('POINT(-55 -55)', 4326), 10)
      )
  )
);

the result after executing in the postgresql is

"MULTIPOLYGON(((30 0,29.4235584120969 -5.85270966048384,27.7163859753386 -11.4805029709527,24.9440883690764 -16.6671069905881,21.2132034355964 -21.2132034355964,16.6671069905881 -24.9440883690763,11.4805029709527 -27.7163859753386,5.85270966048389 -29.4235584120969,4.84662765649901e-014 -30,-5.85270966048379 -29.4235584120969,-11.4805029709526 -27.7163859753386,-16.667106990588 -24.9440883690764,-21.2132034355964 -21.2132034355965,-24.9440883690763 -16.6671069905881,-27.7163859753386 -11.4805029709528,-29.4235584120969 -5.85270966048394,-30 -9.69325531299803e-014,-29.4235584120969 5.85270966048375,-27.7163859753386 11.4805029709526,-24.9440883690764 16.667106990588,-21.2132034355965 21.2132034355963,-16.6671069905882 24.9440883690763,-11.4805029709528 27.7163859753386,-5.85270966048396 29.4235584120969,-1.12092138956216e-013 30,5.85270966048374 29.4235584120969,11.4805029709526 27.7163859753386,16.667106990588 24.9440883690764,21.2132034355964 21.2132034355965,24.9440883690763 16.6671069905881,27.7163859753386 11.4805029709528,29.4235584120969 5.85270966048391,30 0),(-10 -10,10 -10,10 10,-10 10,-10 -10)),((-65 -65,-65 -45,-45 -45,-45 -65,-65 -65)))";

Now After this my php do the conversion of this is array(which converts the given system datatable into array)

$arr = pg_fetch_array($res);

Now i want to write similar function which php do?
But unable to convert correctly

my function look like this

public Array FetchArray(DataTable Dt)
    {
        int[] array;
        Array arr = new Array[];
        Array converted = new Array(Dt.Rows.Count);
        foreach (DataRow row in Dt.Rows)
        {
            arr.Add(row);//here it should convert the system DataTable into sytem array
        }
        return arr;

    }

somebody Please help me.
Thanks in Advance.

  • 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-30T14:31:00+00:00Added an answer on May 30, 2026 at 2:31 pm

    The System.Data.DataRow class has an ItemArray property that returns the row’s values in an array (of type object)

    So, maybe the following example will help you get where you’re trying to go:

    foreach (DataRow row in Dt.Rows)
    {
        object[] values = row.ItemArray;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In one of the applications I have been referring to, the Connection String is
I'm referring to a problem similar to the one in this post , because
In one of the videos of RIA services of Pluralsight I was referring, they
Referring on this question , I have a similar -but not the same- problem..
I have created some custom menu referring Custom Menu visible to one document in
I was referring to one of the examples and on it's aspx pages, this
Why is it that a lot of people are referring to One-to-One when I
The post I am referring to is this. Not only does the first one
Referring to this question , how can i get the current page size in
referring to this question , I've decided to duplicate the tables every year, creating

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.