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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T02:09:28+00:00 2026-06-13T02:09:28+00:00

I have: for(int b = 0; b <num; b++) { string naz_pkt = punkt_

  • 0

I have:

for(int b = 0; b <num; b++)
{
    string naz_pkt = "punkt_" + b.ToString();

    Point naz_pkt = new Point(i,j);
    ....
}

And what, I need to do:

I want make Points, where name of the Point will be change with the loop. And i will have for ex.

Point punkt_1 = new Point(0,1);
Point punkt_2 = new Point(0,2);
Point punkt_3 = new Point(0,3);
etc.

After that I want drow this points by polygon.
Thanks for help.

  • 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-06-13T02:09:29+00:00Added an answer on June 13, 2026 at 2:09 am

    If you don’t really care about the name of the points, you can use a list to hold them:

    List<Point> allPoints = new List<Point>();
    for(int b = 0; b < num; b++)
    {
        Point naz_pkt = new Point(i,j);
        allPoints.Add(naz_pkt);
    }
    

    If you care about the name you can use something like KeyValuePair:

    List<KeyValuePair<string, Point>> allPoints = new List<KeyValuePair<string, Point>>();
    for (int b = 0; b < num; b++)
    {
        var pointName = "punkt_" + b.ToString();
        var pointObject = new Point(i, j);
        KeyValuePair<string, Point> point = new KeyValuePair<string, Point>(pointName, pointObject);
    
        allPoints.Add(point);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a class Player public Player (String name, int num) { name =
I have one class. Class First { private Second second; public First(int num, String
I have this structure: static Dictionary<int, Dictionary<int, string>> tasks = new Dictionary<int, Dictionary<int, string>>();
In C, suppose I need to take input from a string int num,cost; char
Lets assume we have the following code: abstract class Base1 { protected int num;
class Test { String field int num public Test (String field, int num) {
I have a class Foo defined like this: class Foo { public: Foo(int num);
I have defined a class TestObject that contains two simple properties num and name.
Java code... If I have int num = 10 + 5; System.out.println(num); The result
I have a function with following signature char requestApiCall(int num, const wchar_t* pParams =

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.