What i am trying to do is to make an WPF Application which allows the user to enter 5 numbers, separated by space, in a text box. Next they press the calculate button which gives them the average of those 5 numbers.
I did this successfully in console mode but now I am really confused on how to go about with this.
I have created the textbox and the button and a textblock where I will show the number. I think I have managed to split the text entered. However, I can't seem to figure out what to do next.
namespace WpfApplication1
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Button_Click_1(object sender, RoutedEventArgs e)
{
txtbox.Text.Split(' ');
}
}
}
Thank you very much for the help.