Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
UWP ApplicationData LocalSettings

I am working on UWP, I want to store paths somewhere, and I found ApplicationData.LocalSettings can do it.
But I got an error when I stored the share folder path through it because of the \ and I don't know why. Is there any good solution to it? Here is the code,just simple:

var path = @"\\192.168.1.1\test";

ApplicationData.Current.LocalSettings.Values.Keys.Contains<string>(path);
ApplicationData.Current.LocalSettings.Values[path] = xxx;

The contains function and add function also throw COMException

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

I tried your code. LocalSettings cannot use path as a key since it contains the \ symbol.

For example,

        String path = @"&&192.168.1.1&test"; // I replaced every \ with &
        ApplicationData.Current.LocalSettings.Values[path] = "your string";

will save your string correctly.

over 4 years ago · Santiago Trujillo Report

0

UWP ApplicationData LocalSettings

We could reproduce this problem, it looks "\" char is not support but not "", for this scenario, the better way is using "path" string as key to replace path value-key. And I will report this problem.

ApplicationData.Current.LocalSettings.Values["path"] = xxxx;

Or replace the header \\ with empty.

var path = @"192.168.1.1\test";
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!