本文介绍了与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#等价于什么?
发布评论