字符串串联问题-撇号支持 [英] String Concatenation Question - Apostrophe Support

查看:76
本文介绍了字符串串联问题-撇号支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尊敬的小组,< o:p></o:p>

我希望有人可以提供基本的帮助.我正在尝试将文件夹名称连接到所需的文本
objWMIService.Get函数.路径中带有撇号,并返回PathNotFound错误. < o:p></o:p>

行是:< o:p></o:p>

objFile = objWMIService.Get(" Win32_LogicalFileSecuritySetting ='"& FolderFileValue.path.ToString& quot; ;''''')o:p></o:p>

文件的路径为:< o:p></o:p>

"F:\ test dump \ EVENING DUTY ROSTER \ Duty rota Jan '13"< o:p> ;</o:p>

我如何将两个字符串连接起来,一个带有撇号?< o:p></o :p>

谢谢.< o:p></o:p>

Alastair< o:p></o:p>

解决方案

Alastair

我不知道我是否曾经遇到过,但是使用 Dear Group,<o:p></o:p>

I hope someone can help with a basic enquiry. I am trying to concatenate a folder name to the text required
for the
objWMIService.Get function. The path has an apostrophe in it and returns the PathNotFound error.<o:p></o:p>

The line is:<o:p></o:p>

objFile = objWMIService.Get("Win32_LogicalFileSecuritySetting='" & FolderFileValue.path.ToString & "'")<o:p></o:p>

The path of the file is:<o:p></o:p>

"F:\test dump\EVENING DUTY ROSTER\Duty rota Jan '13"<o:p></o:p>

How could I concatenate the two strings, one with an apostrophe?<o:p></o:p>

Thanks.<o:p></o:p>

Alastair<o:p></o:p>

解决方案

Alastair,

I don't know if I've run into that before or not, but use IO.Path.Combine to create the full file path and see if that balks about the apostrophe?


这篇关于字符串串联问题-撇号支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆