⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 latebindingtests.vb

📁 大名鼎鼎的mono是.NET平台的跨平台(支持linux
💻 VB
📖 第 1 页 / 共 3 页
字号:
        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Short", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C220        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        'Public Function F(ByVal s As SByte) As String        '    Return "SByte"        'End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        Public Function F(ByVal s As ULong) As String            Return "ULong"        End Function#End If        Public Function F(ByVal s As Integer) As String            Return "Integer"        End Function        Public Function F(ByVal s As Long) As String            Return "Long"        End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    'TargetJvmNotWorking - Assert.AreEqual("Short", o.F(sb)) Fail - support for 2.0 sbyte    <Category("TargetJvmNotWorking")> _    <Test()> _    Public Sub LateBind_PrimitiveTypes_220()        Dim o As Object = New C220        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("Short", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C230        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        'Public Function F(ByVal s As UShort) As String        '    Return "UShort"        'End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        Public Function F(ByVal s As ULong) As String            Return "ULong"        End Function#End If        Public Function F(ByVal s As Integer) As String            Return "Integer"        End Function        Public Function F(ByVal s As Long) As String            Return "Long"        End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    <Test()> _    Public Sub LateBind_PrimitiveTypes_230()        Dim o As Object = New C230        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("Integer", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C240        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        'Public Function F(ByVal s As UInteger) As String        '    Return "UInteger"        'End Function        Public Function F(ByVal s As ULong) As String            Return "ULong"        End Function#End If        Public Function F(ByVal s As Integer) As String            Return "Integer"        End Function        Public Function F(ByVal s As Long) As String            Return "Long"        End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    <Test()> _    Public Sub LateBind_PrimitiveTypes_240()        Dim o As Object = New C240        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("Long", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C250        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        'Public Function F(ByVal s As ULong) As String        '    Return "ULong"        'End Function#End If        Public Function F(ByVal s As Integer) As String            Return "Integer"        End Function        Public Function F(ByVal s As Long) As String            Return "Long"        End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    <Test()> _    Public Sub LateBind_PrimitiveTypes_250()        Dim o As Object = New C250        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("Single", o.F(ul))#End If    End Sub    Private Class C260        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        Public Function F(ByVal s As ULong) As String            Return "ULong"        End Function#End If        'Public Function F(ByVal s As Integer) As String        '    Return "Integer"        'End Function        Public Function F(ByVal s As Long) As String            Return "Long"        End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    <Category("TargetJvmNotWorking")> _    <Test()> _    Public Sub LateBind_PrimitiveTypes_260()        Dim o As Object = New C260        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Long", o.F(i))        Assert.AreEqual("Long", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C270        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        Public Function F(ByVal s As ULong) As String            Return "ULong"        End Function#End If        Public Function F(ByVal s As Integer) As String            Return "Integer"        End Function        'Public Function F(ByVal s As Long) As String        '    Return "Long"        'End Function        Public Function F(ByVal s As Char) As String            Return "Char"        End Function        Public Function F(ByVal s As Double) As String            Return "Double"        End Function        Public Function F(ByVal s As Single) As String            Return "Single"        End Function    End Class    <Category("TargetJvmNotWorking")> _    <Test()> _    Public Sub LateBind_PrimitiveTypes_270()        Dim o As Object = New C270        Assert.AreEqual("Boolean", o.F(bo))        Assert.AreEqual("Byte", o.F(b))        Assert.AreEqual("Short", o.F(s))        Assert.AreEqual("Integer", o.F(i))        Assert.AreEqual("Single", o.F(l))        Assert.AreEqual("Char", o.F(c))        Assert.AreEqual("Double", o.F(d))        Assert.AreEqual("Single", o.F(si))#If NET_2_0 Then        Assert.AreEqual("SByte", o.F(sb))        Assert.AreEqual("UShort", o.F(us))        Assert.AreEqual("UInteger", o.F(ui))        Assert.AreEqual("ULong", o.F(ul))#End If    End Sub    Private Class C280        Public Function F(ByVal s As Boolean) As String            Return "Boolean"        End Function        Public Function F(ByVal s As Byte) As String            Return "Byte"        End Function        Public Function F(ByVal s As Short) As String            Return "Short"        End Function#If NET_2_0 Then        Public Function F(ByVal s As SByte) As String            Return "SByte"        End Function        Public Function F(ByVal s As UShort) As String            Return "UShort"        End Function        Public Function F(ByVal s As UInteger) As String            Return "UInteger"        End Function        Public Function F(ByVal s As ULong) As String

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -