Sorted List

Input Design

Source Code

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Collections;
namespace sorted_list
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
SortedList s1 = new SortedList();
private void button1_Click(object sender, EventArgs e)
{
foreach (object ha in s1.Values)
{
listBox1.Items.Add(ha);
}
}
private void Form1_Load(object sender, EventArgs e)
{
s1.Add("jisha", "achu");
s1.Add("arya", "kichu");
s1.Add("kittu", "anju");
s1.Add("malu", "surya");
}
}
}

Output Screen


No comments:

Post a Comment