Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

181
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda