1
使用转换器(展鹏,Telerik的,...)之后,我不能把这个表达式C#来vb.netC#表达拉姆达到VB.NET
if (afterItemRemoved != null)
{
cacheItemPolicy.RemovedCallback = x => afterItemRemoved(
x.CacheItem.Key,
(T)x.CacheItem.Value);
}
我曾尝试没有成功下列表达式(反射器8.5代展鹏Ÿconverter.telerik.com)
If (afterItemRemoved IsNot Nothing) Then
cacheItemPolicy.RemovedCallback = x => afterItemRemoved.Invoke(x.CacheItem.Key, DirectCast(x.CacheItem.Value, T))
End If
If afterItemRemoved IsNot Nothing Then
cacheItemPolicy.RemovedCallback = Function(x) afterItemRemoved(x.CacheItem.Key, DirectCast(x.CacheItem.Value, T))
End If
您已经试过什么样子从原来的完全不同。为什么函数名称在你的尝试中不同? – DarkKnight
是两种类似的方法,是一种转录错误。谢谢你的评论。 –
将“!=”(C#)转换为“>”(VB.NET)的工具肯定不是太有用。 – varocarbas