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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T05:24:23+00:00 2026-05-27T05:24:23+00:00

I am unable to determine why the code here will not compile in MonoDevelop

  • 0

I am unable to determine why the code here will not compile in MonoDevelop 2.8.2 on Win32 using Mono 2.10.6. Monodevelop indicates that found_image_paths is an unassigned local variable?

Am I missing something here? I am new to C#

    string path = this.DirectoryChooser.CurrentFolder;

    Console.WriteLine ("Selected Path: " + path);

    //Iterate over all DAE files in this folder
    string[] model_paths =  Directory.GetFiles(path,"*.dae");
    HashSet<string> found_image_paths;

    foreach (string dae_path in model_paths)
    {

        XmlDocument xmlDoc= new XmlDocument(); //* create an xml document object.

        xmlDoc.Load(dae_path); //* load the XML document from the specified file.

        //* Get elements.
        XmlNodeList library_images = xmlDoc.GetElementsByTagName("library_images");

        System.Console.WriteLine(dae_path);
        foreach (XmlNode image_node in library_images[0].ChildNodes) {
            string image_path = image_node.FirstChild.InnerText;
            found_image_paths.Add(image_path);
            Console.WriteLine(image_path);
        }



    }
    //The next line returns the error "Use of unassigned local variable 'found_image_paths'
    foreach (var item in found_image_paths) {
  • 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-27T05:24:24+00:00Added an answer on May 27, 2026 at 5:24 am

    Because it is unassigned; you need to instantiate a hashset and assign it to your variable or at least assign it null.

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

Sidebar

Related Questions

Unable to find a SQL diff tool that meets my needs, I am writing
I have been unable to determine the cause of this problem, so I can
I'm struggling with creating a simple one-to-many relationship using Code First in EF. I
I am unable to determine which form submit button is clicked during an Ajax
I have some code that does a bunch of HTTP GETs, POSTs, and PUTs
Could someone here please help me understand how to determine when floating point limitations
I am using version 2 of ProtoBuf-net, and currently I'm geting the error Unable
I'm working on a project that will use the .NET wrapper for the YouTube
I'm getting this exception when calling SaveChanges on my EF ObjectContext: Unable to determine
My app is unable to determine lat/long coordinates over 3G in North America. 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.