相当于vb.net [英] vb.net equivalent
本文介绍了相当于vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
嗨
什么是vb.net相当于;
y = Right(x,Len(x) - x.LastIndexOf (\))
谢谢
问候
PS:尝试从完整路径中提取文件名,万一有人想知道。
$ div class =h2_lin>解决方案
嗨John,
现在我在哪里看到这个想法? ;-))
sFileName = sFilePath.Substring(sFilePath.LastIndexOf(" \")+ 1)
问候,
Fergus
ps。您可以在同一个帖子中询问 - 我们已经看过它了!
John,
我会推荐''系统。 IO.Path.GetFileName''Herfried
的功能在另一个帖子中指出。
希望这有帮助
Jay
" John" <乔** @ nospam.infovis.co.uk>在消息中写道
news:O
************* @ TK2MSFTNGP10.phx.gbl ...嗨
什么是vb.net相当于;
y =右(x,Len(x) - x.LastIndexOf(&\\; \ ))
感谢
问候
PS:试图从完整路径中提取文件名,万一有人想知道。
Hi
What is the vb.net equivalent of;
y = Right(x, Len(x) - x.LastIndexOf("\"))
Thanks
Regards
PS: Trying to extract filename from the full path, in case anyone is
wondering.
解决方案
Hi John,
Now where have I see that idea? ;-))
sFileName = sFilePath.Substring (sFilePath.LastIndexOf ("\") + 1)
Regards,
Fergus
ps. You could have asked in the same thread - we''d have seen it!
John,
I would recommend the ''System.IO.Path.GetFileName'' function that Herfried
pointed out in the other thread.
Hope this helps
Jay
"John" <jo**@nospam.infovis.co.uk> wrote in message
news:O
*************@TK2MSFTNGP10.phx.gbl...Hi
What is the vb.net equivalent of;
y = Right(x, Len(x) - x.LastIndexOf("\"))
Thanks
Regards
PS: Trying to extract filename from the full path, in case anyone is
wondering.
这篇关于相当于vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文