0

我根本不熟悉 C#.NET。我需要将其转换为 VB。谁能帮我一把?

public IEnumerable<CodecInfo> AudioCodecs
        {
            get { return softPhone.Codecs.Where(c => c.CodecType == CodecMediaType.Audio); }
        }

谢谢

4

3 回答 3

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 中的方法语法更具可读性

于 2012-08-16T13:04:21.923 回答
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 转换器:

http://www.developerfusion.com/tools/convert/csharp-to-vb/

于 2012-08-16T13:04:35.140 回答
0
Public ReadOnly Property AudioCodecs() As IEnumerable(Of CodecInfo)
    Get
        Return softPhone.Codecs.Where(Function(c) c.CodecType = CodecMediaType.Audio)
    End Get
End Property
于 2012-08-16T13:03:52.517 回答