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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:48:24+00:00 2026-05-23T08:48:24+00:00

I have a specification where the user needs to type in a string of

  • 0

I have a specification where the user needs to type in a string of pair of co-ordinates like:

{{2,3}, {9,0}}

these are the co-ordinates of a line on a 2-D axis.

I want to parse this user-input string during runtime dynamically in C# and enter these co-ordinates in a 2-D array. I know we can do hard-coded:

int[,] CoOrdinates = {{2,3}, {9,0}};

but I do not know how to get the user to type in a string and get the co-ordinates from the string to store in the array dynamically.

I’m using Console.Readline(); to get the user to input the co-ordinates.

Please help, thanks!

  • 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-23T08:48:24+00:00Added an answer on May 23, 2026 at 8:48 am

    I would use a regular expression (Regex class in C#) to parse out the bits of the string you want, and then Int32.TryParse() to convert the string to a number. This is a good resource for constructing regular expressions, and this is my preferred regex tester. Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have defined a specification as an object of type Expression<Func<User, bool>> like this:
So I have a a text file that looks something like this: public >ret
I have a User entity that has a IList property. The mapping for this
I have a number of NSStrings like this: NSString *eightlabel = @The process is
For a project I have a specification with formulas, I have to implement. In
I have a function specification that states it that should evaluate a polynomial function
I'm relatively new to the Component Object Model specification - I have a simple
Using Flex and Bison, I have a grammar specification for a boolean query language,
Have gone through hibernate api specification on FlushMode but didn't get the exact difference.
I have been given a specification that requires the ISO 8601 date format, does

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.