简体   繁体   English

为什么Path.Combine在Windows Phone 8中不起作用

[英]Why Path.Combine not working in Windows Phone 8

I am creating Windows Phone 8 app. 我正在创建Windows Phone 8应用。 In that I've Util static class. 在我所Util静态类。 Now while creating database, I've kept database name as const string & database path as static string , when I try to combine it, it gives me incorrect path, WHY? 现在,在创建数据库时,我将数据库名称保留为const string ,将数据库路径保留为static string ,当我尝试将其组合时,它给了我错误的路径,为什么? See below image for proof. 请参见下图以证明。 What's wrong with my code. 我的代码有什么问题。

在此处输入图片说明

You're calling Path.Combine() with one parameter, which will just return the input. 您正在使用一个参数调用Path.Combine() ,它将仅返回输入。 Change + to , to pass it two parameters, which will cause it to combine the paths. +更改为,以向其传递两个参数,这将导致其合并路径。

Also try to copy+paste relevant code, that reads a whole lot easier than a screenshot. 另外,请尝试复制并粘贴相关代码,该代码比截屏要容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM