Hello I am 13 and trying to learn c#. I have a book that is teaching me but some codes I can't get to work I would like to run them by you(Who ever reads this) and see what is wrong.
First Code(I wrote this) I Put the whole code:
//This is supposed to fill a progress bar
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;
namespace Book_Var_test
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
var a = 1;
bool there = false;
var p = progressBar1;
a = a + 1;
button1.Text = "Loading";
while (there == false)
if (p.Value == 100)
{
button1.Text = "Finshed";
}
else
{
p.Value = p.Value + 1;
}
}
private void Form1_Load(object sender, EventArgs e)
{
}
}
}