, Visual C#


- 2


' j = 0,1,2,3,...,(N_y - 1):

Dim myArrayVB_Client(N_x, N_y) As Single

 

' myArrayVB(i, j) VB

' myArrayVB_Client(i, j) VB:

For i = 0 To N_x

For j = 0 To N_y

myArrayVB_Client(i, j) = myObject.myFunction1(i, j)

Next

Next

' .

' :

Dim x1, y1, x2, y2 As Single

' myPen 3:

Dim myPen As New Pen(Color.Black, 3)

' , myArrayVB_Client(i, j):

x1 = myArrayVB_Client(0, 0)

y1 = myArrayVB_Client(0, 1)

x2 = myArrayVB_Client(1, 0)

y2 = myArrayVB_Client(1, 1)

e.Graphics.DrawLine(myPen, x1, y1, x2, y2)

x1 = x2

y1 = y2

x2 = myArrayVB_Client(2, 0)

y2 = myArrayVB_Client(2, 1)

e.Graphics.DrawLine(myPen, x1, y1, x2, y2)

x1 = x2

y1 = y2

x2 = myArrayVB_Client(3, 0)

y2 = myArrayVB_Client(3, 1)

e.Graphics.DrawLine(myPen, x1, y1, x2, y2)

End Sub

43.3. pictureBox1_Paint .

private void pictureBox1_Paint(object sender,

PaintEventArgs e)

{

// myObject . Class1 VB:

ComponentVB.Class1 myObject =

new ComponentVB.Class1();

// myArrayVC(i, j):

int i, j;

// myArrayVC(i, j):

int N_x = 2001; int N_y = 2;

// myArrayVC[i, j] - float,

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

// j = 0,1,2,3,...,(N_y - 1):

float[,] myArrayVC = new float[N_x, N_y];

// myArray Array

// myFunction1,

// myArrayVB(i, j) VB:

Array myArray = (Array)myObject.myFunction1();