Dot Net Framework
A)
Write a program in C#.Net to read n numbers in an array and display it in
reverse
order.
Answer :
namespace WinFormsApp23
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
listBox1.Items.Add(textBox1.Text);
}
private void button2_Click(object sender, EventArgs e)
{
listBox2.Items.Clear();
for (int i = listBox1.Items.Count-1; i >= 0; i--)
{
listBox2.Items.Add
(listBox1.Items[i]);
}
}
}
}
Output :
B)
Write a VB.NET program to create a table Patient (PID, PName, Contact No,
Disease).
Insert five records into table and display appropriate message in message box.
ENo
EName Salary
Answer :
Output :
No comments:
Post a Comment