我根本不熟悉 C#.NET。我需要将其转换为 VB。谁能帮我一把?
public IEnumerable<CodecInfo> AudioCodecs
{
get { return softPhone.Codecs.Where(c => c.CodecType == CodecMediaType.Audio); }
}
谢谢
我根本不熟悉 C#.NET。我需要将其转换为 VB。谁能帮我一把?
public IEnumerable<CodecInfo> AudioCodecs
{
get { return softPhone.Codecs.Where(c => c.CodecType == CodecMediaType.Audio); }
}
谢谢
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 中的方法语法更具可读性
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 转换器:
Public ReadOnly Property AudioCodecs() As IEnumerable(Of CodecInfo)
Get
Return softPhone.Codecs.Where(Function(c) c.CodecType = CodecMediaType.Audio)
End Get
End Property