gpt4 book ai didi

c# - 如何将此 C# 代码转换为 Visual basic

转载 作者:行者123 更新时间:2023-11-30 13:42:17 35 4
gpt4 key购买 nike

我不确定如何将带有委托(delegate)的 C# 代码转换为 Visual basic 代码,你能帮我吗?

List<XmlUser> matchingUsers = this.Store.Users.FindAll(delegate(XmlUser user) 
{
return user.Email.Equals(emailToMatch,
StringComparison.OrdinalIgnoreCase);
}
);

最佳答案

Dim matchingUsers As List(Of XmlUser) = Me.Store.Users.FindAll( _
Function(user As XmlUser) user.Email.Equals(emailToMatch, StringComparison.OrdinalIgnoreCase) _
)

关于c# - 如何将此 C# 代码转换为 Visual basic,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3522105/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com