带有 Option Strict On 的 C#“动态"的 VB.NET 等效项 [英] VB.NET equivalent for C# 'dynamic' with Option Strict On

查看:27
本文介绍了带有 Option Strict On 的 C#“动态"的 VB.NET 等效项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在使用类型安全的 VB.NET 时,即使用 Option Strict On 时,是否有 C# 4 'dynamic' 关键字的等效关键字?

Is there an equivalent for the C# 4 'dynamic' keyword when using type safe VB.NET, i.e. with Option Strict On?

推荐答案

相当于 VB.NET 中的 Object,但带有 Option Strict Off.Option Strict On 没有等价物.换句话说,dynamic 关键字带来了 Option Strict Off等效于 C# 的功能.

The equivalent is Object in VB.NET but with Option Strict Off. With Option Strict On there's no equivalent. Put another way the dynamic keyword brings Option Strict Off equivalent functionality to C#.

这篇关于带有 Option Strict On 的 C#“动态"的 VB.NET 等效项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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