Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

How I convert this from vb to c# Public Class Form1 Dim ale inMove As Integer Di

ID: 3838259 • Letter: H

Question

How I convert this from vb to c#

Public Class Form1 Dim ale inMove As Integer Dim ale ins (10) As PictureBox Private Sub Timer1_Tick (ByVal sender As System.Object, ByVal e As system.Event.Args) Handles pbalein.Left Me.Widht Then pbalein.Top + = (pbalein.Height + 5) End If End Sub Private Sub Form1_Load (ByVal sender As System.Object, ByVal e As system.Event.Args) Handles Timer!.Enabled = True ale inMove = 5 For LC = 0 To 3 ale ins (LC) = New PictureBox ale ins (LC). Image = pbale in.Image ale ins (LC).Location = New System.Drawing.Point ((Int (Rnd() * 13) + 1) * 50 (Int (Rnd ale ins (LC).Size = New Size (50, 40) Me.Controls.Add (ale ins (LC)) Next End Sub End Class

Explanation / Answer

using Microsoft.VisualBasic;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Diagnostics;

public class Form1 {
    
    private int aleinMove;
    
    private void Timer1_Tick(object sender, System.EventArgs e) {
        if (((phalein.Left < 0)
                    || ((phalein.Left + phalein.Width)
                    > this.Width))) {
            phalein.Top = (phalein.Top
                        + (phalein.Height + 5));
            aleinMove = (aleinMove * -1);
        }
        
    }
    
    private void Form1_Load(object sender, System.EventArgs e) {
        aleinMove = 5;
        for (LC = 0; (LC <= 3); LC++) {
            aleins(LC) = new PictureBox();
            aleins(LC).Image = phalein.Image;
            aleins(LC).Location = new System.Drawing.Point(((Int((Rnd() * 13)) + 1)
                            * 50), Int(Rnd()), aleins(LCUnknown.Size=NewSize(50,40Unknown, this.Controls.Add(aleins(LC)), Next, End, Sub, End, Class);
        }
        
    }
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote