Skip to content

Instantly share code, notes, and snippets.

@eternaltung
Created February 27, 2015 15:37
Show Gist options
  • Save eternaltung/c9718498285b3991915a to your computer and use it in GitHub Desktop.
Save eternaltung/c9718498285b3991915a to your computer and use it in GitHub Desktop.
using System.Collections.Generic;
using System.Windows;
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
List<int> numbers = new List<int>();
for (int i = 0; i < 5; i++)
{
numbers.Add(i);
}
TestListBox.ItemsSource = numbers;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment