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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:42:14+00:00 2026-06-15T21:42:14+00:00

I am currently working with displaying a list of items. I have created a

  • 0

I am currently working with displaying a list of items. I have created a method GetNextItem that returns obj1. When I am calling the method from the buttonClick I get this following error:

Cannot implicitly convert type 'TreeFarm.Form1.fruit_trees' to 'string'.

Not sure why is doing such thing.

public items_list GetNextItem()
{
    items_list obj1 = this.current_item;
    if (obj1 != null)
    {
        current_item = current_item.next_item;
    }
    return obj1;
}

ListForItems mainlist = new ListForItems();
private void ShowNextItem_Click(object sender, EventArgs e)
{

    labelSpecificItem.Text = mainlist.GetNextItem();         
}
  • 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-15T21:42:15+00:00Added an answer on June 15, 2026 at 9:42 pm

    You’re trying to convert a value of type items_list in to a string (.Text is of String type). So, if this is one of your objects you can create an implicit cast operator or maybe try using .ToString() or explicitly casting it to a string using (String)mainlist.GetNextItem().

    if you desire this kind of assignment and items_list is one of your objects, I would suggest the following addition to that class:

    public static implicit operator String(items_list itemslist)
    {
        return /* however you want to portray itemslist as a string */;
    }
    

    Otherwise you’re going to have to rely on ToString() getting it right.

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

Sidebar

Related Questions

I'm currently working on a website which is displaying users tweets from the twitter
I currently have a working table that is sorted by several select boxes. I
I am currently working with a link list of items. I am aware of
i am currently working on importing data from excel sheet to sql server.i have
I am currently working on a site that is displaying relatively long (~5sec) render
I am currently working with list of items loaded at the start of the
I am currently working on a GWT project where I am displaying an HTML
Currently working with converting SQLException error messages into messages that are more useful for
Im currently working on a game that uses multi touch to apply zoom to
I'm displaying entries from SQLite database in Expandable ListView and everything is working correctly

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.