将c#的行转换为vb [英] Convert line of c# into vb

查看:55
本文介绍了将c#的行转换为vb的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,有人可以转换此行代码

Hello, can someone please convert this line of code

views view = viewinfos.mean(info => info.viewtype == views.name && views.read == 42)

推荐答案

Dim view as views = viewinfos.mean(Function(info) info.viewtype = views.name And views.read = 42) 


如果您无法弄清楚这个简单的陈述,您是否会要求我们为你翻译整个项目?



更好地学习C#和VB语法的基本概念。



这个line定义了一个名为 view 的变量,其类型为 views

然后它分配给它一个使用 mean 方法的值vie winfos 类,使用lambda表达式作为过滤器。



在这里,您将学习如何在VB.NET中使用lambda表达式:

Lambda Expressions(Visual Basic) [ ^ ]
If you cannot figure out this simple statement, are you going to ask us to translate the whole project for you?

Better learn basic notions on C# and VB syntaxes.

This line defines a variable named view of type views.
Then it assigns to it a value using the mean method of the viewinfos class, using a lambda expression as a filter.

Here you will learn how to use lambda expressions in VB.NET:
Lambda Expressions (Visual Basic)[^]


这篇关于将c#的行转换为vb的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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