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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:23:49+00:00 2026-06-14T10:23:49+00:00

I am using Mono Develop For Android and would like some help with using

  • 0

I am using Mono Develop For Android and would like some help with using an array of structs.

Here is my code:

public struct overlayItem
{
    string stringTestString;
    float floatLongitude;
    float floatLatitude;
}

And when using this struct:

overlayItem[1] items;
items[0].stringTestString = "test";
items[0].floatLongitude = 174.813213f;
items[0].floatLatitude = -41.228162f;

items[1].stringTestString = "test1";
items[1].floatLongitude = 170.813213f;
items[1].floatLatitude = -45.228162f;

I am getting the following error at the line:

overlayItem[1] items;

Unexpected symbol ‘items’

Can I please have some help to correctly create an array of the above struct and then populate it with data.

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-06-14T10:23:50+00:00Added an answer on June 14, 2026 at 10:23 am

    Define your struct like:

    overlayItem[] items = new overlayItem[2];
    

    Also you need to define your fields in the struct as public, to be able to access them outside the struct

    public struct overlayItem
    {
        public string stringTestString;
        public float floatLongitude;
        public float floatLatitude;
    }
    

    (you may use Pascal case for your structure name)

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

Sidebar

Related Questions

I am using MonoDevelop for Android and would please like some help with creating
i'm trying to use gmap on android (trying to develop it using mono for
I am currently using Mono for Android to develop a mobile application. I have
I'm using Mono for Android (C#) and WebClient DownloadString to get source code of
I am using Mono for Android to develop an app in C#. I need
Using Mono for Android, Monodevelop 2.8.6.5 Deploying to real device (like to emulator too)
I'm new to Mono for Android (using MonoDevelop) and Android development in general. I
I've mainly been using Mono for Android via Visual Studio, but have switched over
I'm trying to develop an Audio Capture application using the AudioRecord class from android
I was developing android app on eclipse till now and now I'm using Mono

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.