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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T02:27:28+00:00 2026-06-17T02:27:28+00:00

Im trying to load a .txt file into a 2D array which i can

  • 0

Im trying to load a .txt file into a 2D array which i can do from a temp in isolated storage but our level builder writes to .txt files and moving them to isolated storage for each one is out of the question.

It is a windows phone game.

The text files Build action is set to content.

The Copy to output is set to Do Not Copy.

The file is in the base content folder.

        var ResrouceStream = Application.GetResourceStream(new Uri("grid_map;component/Data.txt", UriKind.Relative));
        if (ResrouceStream != null)
        {
          //do reading here
        }

I have a breakpoint on the if statment after it and when i check the var, it is still null and later on it throughs a null error in using (StreamReader Reader = new StreamReader(ResrouceStream .Stream))

because ResrouceStream is null.

Ive tried most ways or reading a .txt file but this seams the best way

  • 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-17T02:27:29+00:00Added an answer on June 17, 2026 at 2:27 am

    If you want to load the file with Application.GetResourceStream, you have to set its build action to Resource, not Content.

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

Sidebar

Related Questions

Trying to load a small .txt file into mysql but get all my data
I'm trying to load data from a .txt file with PHP, but I fail
i am trying load file after it created from /stext command line but its
I am trying to load some data from a text file into a vector
I'm trying to load a simply TXT file into a NSMutableArray. My file is
I am trying to load some data from a text file into mysql. I
I am trying to load a CSV file into an array using ColdFusion (version
I'm trying only to load a part of a text file (*.txt) into the
I'm trying to load some data from a fixed width text file into a
trying to load in a bunch of images into a list from a directory...my

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.