Rowel Virgo
asked on
Convert C# to VB.NET
Thanks heres the source code link from google drive and this is video link from youtube.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NamesGenerator
{
public partial class Form1 : Form
{
string[] FirstNames = { "John", "Peter", "Jason", "Andrew", "Richard" };
string[] LastNames = { "Lannister", "Targaryen", "Snow", "Stark", "Mormont", "Tarly", "Greyjoy" };
Random rand = new Random();
public Form1()
{
InitializeComponent();
}
private void btn_Generate_Click(object sender, EventArgs e)
{
int indexFirstName = rand.Next(FirstNames.Length);
int indexLastName = rand.Next(LastNames.Length);
this.txtbox_FirstName.Text = FirstNames[indexFirstName];
this.txtbox_LastName.Text = LastNames[indexLastName];
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace NamesGenerator
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
site cannot convert it
Both runs fine. Which one you are facing issues with?
I have also given you the converted code.
I have also given you the converted code.
ASKER