我如何从字符串中选择?
Dim str as string = "
如何选择如下值...
Dim id as string = get the value of id (value1)
Dim type as string = get the value of type (value 2)
Dim ReadValue3 as string = get the value3
Dim str as string = "<request id=value1 type=value2>value3</request>"
How could select the values as follows...
Dim id as string = get the value of id (value1)
Dim type as string = get the value of type (value 2)
Dim ReadValue3 as string = get the value3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,我不明白为什么您需要使用 LINQ 本身,但您当然可以使用 LINQ to XML:(
如果 VB 有语法问题,我深表歉意……可以这么说,它不是我的母语。)
Well, I can't see why you'd need to use LINQ itself, but you could certainly use LINQ to XML:
(Apologies if the VB has syntax issues... it's not my mother tongue, so to speak.)
请注意,可以将 linq 与字符串一起使用,请参阅
http://msdn.microsoft.com/en-us/library/bb397915。 aspx
在处理 xml 时你只是不想这样做
Note it is possible to use linq with strings see
http://msdn.microsoft.com/en-us/library/bb397915.aspx
you just wouldn't want to when dealing with xml