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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T21:45:06+00:00 2026-06-16T21:45:06+00:00

Today I came across a problem I had never had before. I’m trying to

  • 0

Today I came across a problem I had never had before. I’m trying to check if a file exists from a value in Windows registry. To be more specific, I’m getting the installation path from Flight Simulator and checking if there is a module installed.

I get the registry key just fine and it is converted to a string (from an object) but I don’t seem to be able to concatenate the filename after it (before is just fine).

RegistryKey pRegKey = Registry.CurrentUser;
pRegKey = pRegKey.OpenSubKey(@"Software\Microsoft\Microsoft Games\Flight Simulator\10.0");
string fSPath = pRegKey.GetValue("AppPath").ToString(); // Receives "S:/Apps/FSX/"

If I show a messagebox like this it does not concatenate:

MessageBox.Show(fSPath + "Modules");
  • 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-16T21:45:07+00:00Added an answer on June 16, 2026 at 9:45 pm

    Add the following line:

    string fSPath = fsPath.Replace("\0","");
    

    before using messagebox.

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

Sidebar

Related Questions

Today I came across a problem where someone had accidentally committed a proj.user file
Today I came across a new CSS syntax that I have never seen before
I came across this problem via a colleague today. He had a design for
Today i came across nested functions which i had never heard of. Is it
i came across a compatibility issue today, as a customer upgraded from Windows XP
I came across Side-by-side Assemblies for the first time today while trying to install
I came across a strange problem today. I created a subclass of UIView and
Today I came across a very nasty problem, I need to make the front-end
Today I installed Microsoft Visual Studio 2012 and I came across a problem that
I came across an interesting problem today whilst implementing a feature into a dynamic

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.