与VB.Net“合并"的C#等价于什么?

编程入门 行业动态 更新时间:2024-10-24 16:33:11
本文介绍了与VB.Net“合并"的C#等价于什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

除了等效于C#合并,我还需要知道VB.Net是否使用Yield还是可以简单地将其删除. 预先谢谢您:)

Besides the equivalent of C# Combine I also need to know if VB.Net uses Yield or if its ok to simply remove it. Thank you in advance :)

推荐答案

VB和C#都可以访问Path.Combine [ ^ ]方法,它是System.IO名称空间的一部分,并且所有.NET语言都可以访问. VB没有收益率,没有,只是删除它并不安全-收益率有非常特定的用途.这里有一个讨论: stackoverflow/questions/97381/yield-in- vb-net [^ ]可能会让您重新考虑使用此特定代码片段(甚至使您考虑学习C#并在单独的项目中逐字使用它) Both VB and C# can access the Path.Combine[^] method, it is part of the System.IO namespace and is accessible to all .NET languages. VB does not have Yield, and no, it'';s not safe to just remove it - yield has a very specific purpose. There is a discussion on it here: stackoverflow/questions/97381/yield-in-vb-net[^] which may make you rethink using this specific code fragment (or even make you think about learning C# and using it verbatim in a separate project)

更多推荐

与VB.Net“合并"的C#等价于什么?

本文发布于:2023-11-09 15:37:23,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572752.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:VB   Net   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!