module1.vb

来自「VS.NET培训 vs.netppeixun.rar」· VB 代码 · 共 34 行

VB
34
字号
Imports Sort
Imports system

Namespace SortTest

    Module Module1

        Shared Sub Main()
            Dim origarray(10), sorted(10) As Double
            Dim RndObj As New system.Random
            Dim i As Integer
            
            'Initilize the array with 10 random numbers
            For i = 0 To 9
                origarray(i) = RndObj.Next()
            Next

            'Create the c# object
            Dim sortclass As New Sorting()
            
            'Call the BubbleSort method passing in the array
            sorted = sortclass.BubbleSort(origarray)

            'Output the results of the two arrays
            Console.Writeline("Bubble sort Example Results")
            For i = 0 To 9
                Console.Writeline(i & ": " & origarray(i) & " " & sorted(i))
            Next
        End Sub

    End Module

End Namespace

⌨️ 快捷键说明

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