我根本不熟悉C#.NET。我需要将其转换为VB。有人可以帮我一把吗?
public IEnumerable<CodecInfo> AudioCodecs
{
get { return softPhone.Codecs.Where(c => c.CodecType == CodecMediaType.Audio); }
}
谢谢
答案 0 :(得分:5)
Public ReadOnly Property AudioCodecs As IEnumerable(Of CodecInfo)
Get
Return From c In softPhone.Codecs
Where c.CodecType = CodecMediaType.Audio
End Get
End Property
查询语法比VB.NET中的方法语法更具可读性
答案 1 :(得分:3)
Public ReadOnly Property AudioCodecs() As IEnumerable(Of CodecInfo)
Get
Return softPhone.Codecs.Where(Function(c) c.CodecType = CodecMediaType.Audio)
End Get
End Property
将来你可以使用C#-VB.NET转换器:
答案 2 :(得分:0)
Public ReadOnly Property AudioCodecs() As IEnumerable(Of CodecInfo)
Get
Return softPhone.Codecs.Where(Function(c) c.CodecType = CodecMediaType.Audio)
End Get
End Property