, Visual C#



Imports System.Math ' .

Imports System.Drawing ' .

Imports System.Drawing.Drawing2D ' .

6. Class1 , , .

43.1. .

Public Class Class1

Public Function myFunction1() As Object

' myArrayVB(i, j):

Dim i, j As Integer

' myArrayVB(i, j):

Dim N_x As Integer = 2000

Dim N_y As Integer = 1

' Single myArrayVB(i, j),

' i = 0,1,2,3,...,N_x; j = 0,1,2,3,...,N_y:

Dim myArrayVB(N_x, N_y) As Single

' 10 :

For i = 0 To N_x

For j = 0 To N_y

myArrayVB(i, j) = 10

Next

Next

' 4- :

myArrayVB(0, 0) = 100

myArrayVB(0, 1) = 50

myArrayVB(1, 0) = 200

myArrayVB(1, 1) = 75

myArrayVB(2, 0) = 300

myArrayVB(2, 1) = 150

myArrayVB(3, 0) = 400

myArrayVB(3, 1) = 300

 

Return myArrayVB

End Function

End Class

43.2. PictureBox1_Paint .

Private Sub PictureBox1_Paint(ByVal sender As Object, _

ByVal e As System.Windows.Forms.PaintEventArgs) _

Handles PictureBox1.Paint

' myObject Class1 VB:

Dim myObject As New ComponentVB.Class1

' myArrayVC(i, j):

Dim i, j As Integer

' myArrayVC(i, j):

Dim N_x As Integer = 2000

Dim N_y As Integer = 1

' myArrayVC(i, j) float,

' i = 0,1,2,3,...,(N_x - 1);




- -  - -  - -