扩展除外 - 转换为VB.NET [英] Except Extension - Translate to VB.NET
本文介绍了扩展除外 - 转换为VB.NET的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
   
嗨。
有人可以帮我将此方法的扩展转换为VB.NET。我已经尝试了几个在线翻译,但所有转换都是错误的。
public static IEnumerable< T>除了< T,TKey>(此IEnumerable< T>项目,IEnumerable< T>其他,Func< T,TKey> getKey)
{
从
项目中的项目返回在getKey(item)中将otherItem加入到其他内容中
将getKey(otherItem)等于tempItems
来自tempItems.DefaultIfEmpty()中的temp
其中ReferenceEquals(null,temp)|| temp.Equals(默认(T))
选择项目;
}
提前致谢
Antonio
解决方案
你试过吗?
Hi.
Someone can help me to convert this extension for the except method to VB.NET. I've tried several online translators but all conversion are wrong.
public static IEnumerable<T> Except<T, TKey>(this IEnumerable<T> items, IEnumerable<T> other, Func<T, TKey> getKey) { return from item in items join otherItem in other on getKey(item) equals getKey(otherItem) into tempItems from temp in tempItems.DefaultIfEmpty() where ReferenceEquals(null, temp) || temp.Equals(default(T)) select item; }
Thanks in advance
Antonio
解决方案
Did you try this?
这篇关于扩展除外 - 转换为VB.NET的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文