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

  • Home
  • SEARCH
  • 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 7017749
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:57:17+00:00 2026-05-27T22:57:17+00:00

I have a structure xyz with 3 string objects in it. foo bar and

  • 0

I have a structure “xyz” with 3 string objects in it. “foo” “bar” and “abc” I want to iterate through the structure and compare the names of the objects.

Structure xyz
    dim foo as string
    dim bar as string
    dim abc as string
End Structure

Pseudo:

For each x as object in xyz 
    if x.Name = "foo" then
        'bang
    end if
End each

Is this possible?

  • 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-27T22:57:17+00:00Added an answer on May 27, 2026 at 10:57 pm

    If this is just a one time thing you’re probably going to have an easier time using a Dictionary instead, but you could do this with Reflection if you prefer to keep the structure.

    This little code snippet will list out each structure member for you in a StringBuilder.

    Dim sbOutput As New System.Text.StringBuilder
    Dim t As Type = GetType(xyz)
    For Each p As System.Reflection.FieldInfo In t.GetFields()
      sbOutput.AppendLine(p.Name)
    Next
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an array whose structure is like $data = array{0=>'abc',1=>xyz,2=>tqs} Now I need
Hi I have 3 table xyz abc and pqr ,structure of xyz and abc
I have the following Inbox folder structure: Inbox --ABC ----ABC 2 ----ABC 3 --XYZ
I have a structure: typedef struct { double x,y,z; } XYZ; I want to
I have a structure in C#: public struct UserInfo { public string str1 {
i have table structure with 3 colums (column1, column2, column3) and i want to
I have following folder structure: ProjectFolder/images/some images In the same folder ProjectFolder/WEB-INF/classes/com/xyz/here is java
I have several files with name abc* and i want to delete all those
I have a structure defined as struct xyz { char *str; int x; int
I've got the following JSON string to deserialize: [{application_id:1,application_package:abc},{application_id:2,application_package:xyz}] I'm using DataContractJsonSerializer method. It

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.