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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:00:57+00:00 2026-05-20T05:00:57+00:00

I have following example method: namespace Postcode_webservice { public class Business { public string

  • 0

I have following example method:

namespace Postcode_webservice
{    
    public class Business
    {
      public string getBusinessDossierno(string KVKnr)
        {
              StringBuilder resultaat = new StringBuilder();
              result = myserviceBusiness.businessGetDossierV3(KVKnr);

              string city = result.results[0].CorrespondenceCity;
              string postcode = result.results[0].CorrespondencePostcode;

              resultaat.Append(city);
              resultaat.Append(postcode);
              return resultaat.ToString();
        }
    }

    public class BusinessInfo
    {
    public string City { get; set; }
    public string PostCode { get; set; }
    public string bedrijfsNaam { get; set; }
    public string adres { get; set; }
    public int huisnr { get; set; }
    }
}

This result in an assembly reference error. (using System.Collections.Generic has been already added)

  • 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-20T05:00:58+00:00Added an answer on May 20, 2026 at 5:00 am

    Better depends on what you need to use it for. If you are passing this client-side to populate the listbox, then I would prefer json. However, if it is to be used server-side, I would stick to .Net objects.

    As a side note, to eliminate the desire to concatenate strings to store data, I would define a type that contains both city and postal code, like this:

    public class MyAddressInfo
    {
        public string City { get; set; }
        public string PostCode {get; set; }
    }
    

    and then use an array (or List) of these:

    List<MyAddressInfo> myList = new List<MyAddressInfo>();
    foreach(var res in result.results)
    {
        myList.Add(new MyAddressInfo
        {
            City = res.CorrespondenceCity,
            PostCode = res.CorrespondencePostcode
        });
    }
    

    And then return the list as described above. If you need to return an array, you can do this:

    return myList.ToArray();

    which would be a return type of MyAddressInfo[]

    @Thomas:
    Per your comment, your method declaration should look like this:

    public MyAddressInfo[] getBusinessDossierno(string KVKnr)
    {
       // etc.
       return myList.ToArray();
    }
    

    What are the other errors that you see when you compile it like this?

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

Sidebar

Related Questions

I have tried using the obvious method as outlined in the following example but
I have the following example class: Test.h: @interface Test : UIButton { NSString *value;
I have the following example code: class A(object): def __init__(self, id): self.myid = id
Say for example I have the following string: var testString = Hello, world; And
Given the following example, why do I have to explicitly use the statement b->A::DoSomething()
I am a newbie to Python and have come across the following example in
I have following string String str = replace :) :) with some other string;
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I have a list of elements (the X in the following examples) displayed either
I have following situation: I have loged user, standard authentication with DB table $authAdapter

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.