This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
DSlink2010's profile picture

C#/C/C++ Related Stuff...And a C# program I worked VERY hard on!

Started by DSlink2010, 05 October 2012 - 10:55 PM
DSlink2010 #1
Posted 06 October 2012 - 12:55 AM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers & Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :(/>/>
Download
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "\nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}
Orwell #2
Posted 06 October 2012 - 01:06 AM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers & Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :(/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Fatal_Exception #3
Posted 06 October 2012 - 01:33 AM
You don't seem to trust the randomness of rand.Next()?
Besides, calling Next() a bunch of times doesn't make the result any more random than calling it once.
Orwell #4
Posted 06 October 2012 - 01:39 AM
You don't seem to trust the randomness of rand.Next()?
Besides, calling Next() a bunch of times doesn't make the result any more random than calling it once.

Only slightly, as it's pseudo-random, calling it multiple times makes it like unnoticeably less predictable. But yea, in practice, it makes no sense.
ETHANATOR360 #5
Posted 06 October 2012 - 02:26 AM
cool if i had a C# compiler i would try this
DSlink2010 #6
Posted 06 October 2012 - 03:38 PM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers & Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :D/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Well.
Here.
1.Assembly
2.Binary(C# Is the 5th hardest with out it)
3.C++
4.C
5.C#
DSlink2010 #7
Posted 06 October 2012 - 03:39 PM
cool if i had a C# compiler i would try this
You need:
Visual studio 2010 c#(Or ultimate)
Now you need to put all the needed items!
DSlink2010 #8
Posted 06 October 2012 - 03:42 PM
You guys wondering why I called

next()
So much?If its only called once then all the integers would have the same number!
BTW: I used Visual Studio Ultimate 2010 with a serial to make it.
Orwell #9
Posted 06 October 2012 - 03:59 PM
You guys wondering why I called

next()
So much?If its only called once then all the integers would have the same number!
BTW: I used Visual Studio Ultimate 2010 with a serial to make it.

>.< You really got some stuff you need to learn. Use the current time as the seed for the rand object, then it won't return the same numer eacht time. If you have 0 as the seed, then the output will be the same each time, even with 20 calls to Next.

End our ranking doesn't make any sense, binary is no programming language that is usable. and even if it would be, it's a hundred times more difficult than assembly. How is c++ more difficult than C? And you think that brainfuck or LISP are easier than those 5 (or actually 4)?
Tiin57 #10
Posted 06 October 2012 - 04:37 PM
Also, don't advertise your illegal IDE. -.-
ETHANATOR360 #11
Posted 06 October 2012 - 09:43 PM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers &amp; Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :D/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Well.
Here.
1.Assembly
2.Binary(C# Is the 5th hardest with out it)
3.C++
4.C
5.C#
i beleive that malbolge is the hardest programing language
hello world malbolge:
<p> ('&amp;%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&amp;%$#"
`CB]V?Tx
billysback #12
Posted 06 October 2012 - 10:17 PM
C# is not exactly hard, I tried it and made some simple programs, I just hadn't memorised the class and function names so I couldn't code very fast, that was the only real degree of difficulty (other than any difficulty from normal coding), though this was switching from a java background :D/>/>
DSlink2010 #13
Posted 06 October 2012 - 11:53 PM
Also, don't advertise your illegal IDE. -.-
Its not illegal.I bought the serial.
Tiin57 #14
Posted 07 October 2012 - 01:43 AM
Also, don't advertise your illegal IDE. -.-
Its not illegal.I bought the serial.
Hmm. Ok. I thought that "Visual Studio Ultimate with a serial" meant that you had pirated it. My apologies.
1v2 #15
Posted 07 October 2012 - 09:23 AM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers &amp;amp; Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :D/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Well.
Here.
1.Assembly
2.Binary(C# Is the 5th hardest with out it)
3.C++
4.C
5.C#

Where is this based on? Looks like it's just something you made up.
Mads #16
Posted 08 October 2012 - 07:19 PM
How do you judge how hard a programming language is?

Btw, how do you execute the program? I don't see a main function, only a lot of functions and variables(also constants) in a namespace. Or is that just how C# works? I only worked with C++ and C.

Also, how in the world would anyone claim that Assembly is harder than Machine Code?
D3matt #17
Posted 09 October 2012 - 01:14 AM
Btw, how do you execute the program? I don't see a main function, only a lot of functions and variables(also constants) in a namespace. Or is that just how C# works? I only worked with C++ and C.
He forgot to include the entire program. He only included his code, and not the Windows Forms code block. This in and of itself will not work, unless you reconstruct the form that he used.
Noodle #18
Posted 09 October 2012 - 01:58 AM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers &amp; Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :D/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}
I don't see how its so hard..
Its like java, and Visual Studio has event handlers on the object.
You don't have to make them.
Unlike java…
Mads #19
Posted 09 October 2012 - 04:11 PM
Java is easy. At least that's what I would say. As stated earlier, I have no way of judging this.
billysback #20
Posted 09 October 2012 - 05:58 PM
I would say C# is easier than Java however…
etopsirhc #21
Posted 09 October 2012 - 06:22 PM
I would say C# is easier than Java however…
i've tried C# , java , C++ , and of course lua ( and some others ) but odly enough the easiest language for me , happenes to be C++ followed closely by java , C# sucks as its for windows only ( linux user ) lua though is kinda hard for me


also @ OP
please correct your title , C and C++ have nothing to do with C# as it's more of MS version of java run though the .net core XP
billysback #22
Posted 09 October 2012 - 06:42 PM
I tried to learn C++ (switching from Java) and just couldn't get my head round it, I recently started Lua and have taken a liking to it, maybe with some Lua experience I could revisit C++ for another try :P/>/>
DSlink2010 #23
Posted 09 October 2012 - 10:11 PM
I would say C# is easier than Java however…
You ARE right.
Btw: Guys, C and C++ are EXACTLY the same!C++ Just has more things you can do in it.

I would say C# is easier than Java however…
You ARE right.
Btw: Guys, C and C++ are EXACTLY the same!C++ Just has more things you can do in it.
Btw, how do you execute the program? I don't see a main function, only a lot of functions and variables(also constants) in a namespace. Or is that just how C# works? I only worked with C++ and C.
He forgot to include the entire program. He only included his code, and not the Windows Forms code block. This in and of itself will not work, unless you reconstruct the form that he used.
I did NOT forget.
DSlink2010 #24
Posted 09 October 2012 - 10:13 PM
I would say C# is easier than Java however…
i've tried C# , java , C++ , and of course lua ( and some others ) but odly enough the easiest language for me , happenes to be C++ followed closely by java , C# sucks as its for windows only ( linux user ) lua though is kinda hard for me


also @ OP
please correct your title , C and C++ have nothing to do with C# as it's more of MS version of java run though the .net core XP
They have a lot in common.But I will take out "/C" in the title 'cause its the same as c++.
immibis #25
Posted 09 October 2012 - 10:14 PM
If you can do more things in A than B, they're not exactly the same.
Orwell #26
Posted 09 October 2012 - 11:29 PM
They have a lot in common.But I will take out "/C" in the title 'cause its the same as c++.

The same..? Let's do OOP in C then (yeah right). You clearly have little idea what you're talking about. And can you please give us the form code for the C# project? So I can get a clearer view on what you're code does.
Noodle #27
Posted 10 October 2012 - 10:51 PM
I would say C# is easier than Java however…
i've tried C# , java , C++ , and of course lua ( and some others ) but odly enough the easiest language for me , happenes to be C++ followed closely by java , C# sucks as its for windows only ( linux user ) lua though is kinda hard for me


also @ OP
please correct your title , C and C++ have nothing to do with C# as it's more of MS version of java run though the .net core XP
Exactly, C# or .NET people have no depth.
They really only know .NET
If you've actually tried them C# is different from most of the languages, that is why it is judged at 5th in hardest to learn.
D3matt #28
Posted 11 October 2012 - 04:22 AM
Btw, how do you execute the program? I don't see a main function, only a lot of functions and variables(also constants) in a namespace. Or is that just how C# works? I only worked with C++ and C.
He forgot to include the entire program. He only included his code, and not the Windows Forms code block. This in and of itself will not work, unless you reconstruct the form that he used.
I did NOT forget.
So you intentionally left out crucial parts of your source code?
DSlink2010 #29
Posted 16 October 2012 - 09:11 PM
I'll put up a video.
Grolimo #30
Posted 17 October 2012 - 08:12 PM
I would say C# is easier than Java however…

That depends on where you come from and what you try to do with the language.
Java and Lua are both inherently non-OOP languages which makes learning the basic concepts easier in my opinion.
But once you've learned how OOP works and how it's implemented with C# which was designed (by Anders Heijlsberg) to be OOP all the way from the ground up you will realize that it is vastly more powerful than both of those put together. It makes your life as a programmer so much easier.

I'd go as far as saying that if it wasn't for (Delphi/)C# then there would never have been any OOP like functionality in Java and/or Lua today.

Anders Heijlsberg designed Delphi (based on the 3rd gl Pascal) for Borland prior to going to Microsoft where he created C#, while the basic language structure of C# is based on C, the OOP design is an improvement over the Delphi design he did earlier.
.
MysticT #31
Posted 17 October 2012 - 08:24 PM
Java and Lua are both inherently non-OOP languages
WTF?? Java is not OOP??? :P/>/>
billysback #32
Posted 17 October 2012 - 08:58 PM
I would say C# is easier than Java however…

That depends on where you come from and what you try to do with the language.
Java and Lua are both inherently non-OOP languages which makes learning the basic concepts easier in my opinion.
But once you've learned how OOP works and how it's implemented with C# which was designed (by Anders Heijlsberg) to be OOP all the way from the ground up you will realize that it is vastly more powerful than both of those put together. It makes your life as a programmer so much easier.

I'd go as far as saying that if it wasn't for (Delphi/)C# then there would never have been any OOP like functionality in Java and/or Lua today.

Anders Heijlsberg designed Delphi (based on the 3rd gl Pascal) for Borland prior to going to Microsoft where he created C#, while the basic language structure of C# is based on C, the OOP design is an improvement over the Delphi design he did earlier.
.

C# was released some 4 years after Java's first public release, to say that Java would not be Object Orientated if it wasn't for C# is absurd…
(Java was released to the public in 1996, C# was released to the public in 2000)

Java is hugely Object Orientated, anyone who has ever made an application in Java would know that, be it simple or advanced.
Lua is a scripting language, it is thus not object orientated (I believe scripting languages are never object orientated, or at least none I have heard of)…
Java and C# are incredibly similar in there class, method and variable set up, C# just doesn't have a "virtual run time environment" which means it is platform (or OS) dependent, where as Java does create it's own run time environment (I think that's what it's called) so as long as it is installed on a computer it can be run, with no dependance on the OS.

I believe many say that this Run Time Envenvironment is what makes Java less efficient, less stable, as a programming language for games…

(I may be wrong in a lot of what I am saying, but I believe the concept is correct…)
Noodle #33
Posted 17 October 2012 - 09:51 PM
C# was released some 4 years after Java's first public release, to say that Java would not be Object Orientated if it wasn't for C# is absurd…
(Java was released to the public in 1996, C# was released to the public in 2000)

Java is hugely Object Orientated, anyone who has ever made an application in Java would know that, be it simple or advanced.
Lua is a scripting language, it is thus not object orientated (I believe scripting languages are never object orientated, or at least none I have heard of)…
Java and C# are incredibly similar in there class, method and variable set up, C# just doesn't have a "virtual run time environment" which means it is platform (or OS) dependent, where as Java does create it's own run time environment (I think that's what it's called) so as long as it is installed on a computer it can be run, with no dependance on the OS.

I believe many say that this Run Time Envenvironment is what makes Java less efficient, less stable, as a programming language for games…

(I may be wrong in a lot of what I am saying, but I believe the concept is correct…)

I agree entirely, but what makes Java so good is that it is cross-platform. More money in sales since Mac users can get it too!
ETHANATOR360 #34
Posted 16 November 2012 - 03:40 PM
java is awesome im only 13 years old and i understand it
billysback #35
Posted 17 November 2012 - 05:39 AM
java is awesome im only 13 years old and i understand it
I started two years ago (when I was 13), it's awesome :)/>/>
nitrogenfingers #36
Posted 18 November 2012 - 06:45 AM
This is an interesting thread :)/>/>

For my money the hardest programming language I've ever come across is APL, a title dripping with originality (A Programming Language). I only saw it used briefly but it has it's own script set that replaces the standard one- so no words and very few letters in the code. I also remember it reads right-to-left. The density of the code is incredible.

I have strong opinions on Java and C# but it may be wisest I keep them to myself.
Sammich Lord #37
Posted 18 November 2012 - 08:09 AM
I would say C# is easier than Java however…
i've tried C# , java , C++ , and of course lua ( and some others ) but odly enough the easiest language for me , happenes to be C++ followed closely by java , C# sucks as its for windows only ( linux user ) lua though is kinda hard for me


also @ OP
please correct your title , C and C++ have nothing to do with C# as it's more of MS version of java run though the .net core XP
You can use Mono on Mac and Linux to run C# apps.
billysback #38
Posted 18 November 2012 - 08:31 AM
I think programming languages can only be separated down in to "relative" difficulty; by this I mean that some languages are obviously harder than others (some are created deliberately *brainfuck* to be so, others are just a unique way which let you do things in a different way, or open up new possibilities because of the abstraction of them) and some are much easier than others (such as VB, I can't really think of many good examples of this) but this "relative" level of difficulty can be measured in it's likeliness to machine code or a human language (most commonly English)

Other than this "relative" difficulty there is is little anyone can say about a programs difficulty, some people may find certain languages easier than others, it's just about the way their brain works and how they learn things, some people may find it easy to pick up almost any language where as others may find it hard to pick up just 1.

Even for this relative difficulty some people may prefer to code in a language which has a resemblance to machine code, not because of the difficulty or abstraction of the language, but just because that's what feels most natural to them, that writing in something resembling a human language is in fact more difficult.

Basically what I am saying is, languages cannot very easily (if at all) be put on a scale of difficulty for everyone, this can mainly only be done "accurately" on a personal scale.


(Just so you know, this is following up on a few posts back when there was a discussion about the difficulty of different languages)
(Also, sorry for another long post; I just like properly portraying my opinion instead of writing a couple of words to show it…)
Sammich Lord #39
Posted 18 November 2012 - 09:12 AM
@billysback You are totally right. You said it perfectly.
Mads #40
Posted 23 November 2012 - 06:10 AM
I personally don't think it's difficult to learn a new language.
Tiin57 #41
Posted 23 November 2012 - 09:17 AM
I personally don't think it's difficult to learn a new language.
Key word there being "personally".
Dlcruz129 #42
Posted 25 November 2012 - 05:22 AM
I've never really used C#, just noticed how much it looks like Java! This might be the next programming language I learn.
DSlink2010 #43
Posted 14 May 2013 - 07:56 PM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers &amp; Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :(/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Well.
Here.
1.Assembly
2.Binary(C# Is the 5th hardest with out it)
3.C++
4.C
5.C#
i beleive that malbolge is the hardest programing language
hello world malbolge:
<p> ('&amp;%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&amp;%$#"
`CB]V?Tx
I didn't know about that so. Btw, that code doesn't work. I executed it and it gave a error. The correct code is ('&amp;%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&amp;%$#"
`CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>
FuuuAInfiniteLoop(F.A.I.L) #44
Posted 15 May 2013 - 09:23 PM
Hey guys.If you have ANY C# related stuff, post it here!And there will also be a download for my program I worked on!
Name of program: "Progress Bar Racers"
Some facts
Spoiler424 Lines Of Code
13074 Letters, Numbers &amp; Symbols
Programming Language: C#
How hard is C#?
You might've guessed its Easy, but its hard!
C# is the 5th hardest programming language.
Btw: C# is MUCH harder then LUA!
No download, Computercraft forums doesn't allow .exe files :(/>/>
But I can give you the code!
Spoiler

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 Video_Player_Works_ //This was something I was working on earlier, but I wanted to do this.
{
	public partial class Form1 : Form
	{
		int money;
		public Form1()
		{
			InitializeComponent();
		}
		private void Form1_Load(object sender, EventArgs e)
		{
			listBox1.SelectedIndex = 0;
		}
		private void button1_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void con1_Tick(object sender, EventArgs e)
		{
			p1.Increment(1);
			if (p1.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con2_Tick(object sender, EventArgs e)
		{
			p2.Increment(1);
			if (p2.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
				if (listBox1.SelectedIndex == 0)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 1)
				{
					money += Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 2)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
				if (listBox1.SelectedIndex == 3)
				{
					money -= Convert.ToInt32(numericUpDown1.Value);
				}
			}
		}
		private void con3_Tick(object sender, EventArgs e)
		{
			p3.Increment(1);
			if (p3.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			}
		  
		}
		private void con4_Tick(object sender, EventArgs e)
		{
			p4.Increment(1);
			if (p4.Value == 100)
			{
				con1.Stop();
				con2.Stop();
				con3.Stop();
				con4.Stop();
			if (listBox1.SelectedIndex == 0)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 1)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 2)
			{
				money -= Convert.ToInt32(numericUpDown1.Value);
			}
			if (listBox1.SelectedIndex == 3)
			{
				money += Convert.ToInt32(numericUpDown1.Value);
			}
			}
		}
		private void button2_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
		}
		private void button3_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
		}
		private void button4_Click(object sender, EventArgs e)
		{
			con1.Stop();
			con2.Stop();
			con3.Stop();
			con4.Stop();
			p1.Value = 0;
			p2.Value = 0;
			p3.Value = 0;
			p4.Value = 0;
			Random rnd1 = new Random();
			Random rnd2 = new Random();
			Random rnd3 = new Random();
			Random rnd4 = new Random();
			int rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			rand1 = rnd1.Next(255);
			int rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			rand2 = rnd2.Next(255);
			int rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			rand3 = rnd3.Next(255);
			int rand4 = rnd4.Next(1, 254);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			rand4 = rnd4.Next(1, 255);
			con1.Interval = rand1;
			con2.Interval = rand2;
			con3.Interval = rand3;
			con4.Interval = rand4;
			con1.Start();
			con2.Start();
			con3.Start();
			con4.Start();
		}
		private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
		{
			if (listBox1.SelectedIndex == 0)
			{
				betp.Text = "Player 1";
			}
			if (listBox1.SelectedIndex == 1)
			{
				betp.Text = "Player 2";
			}
			if (listBox1.SelectedIndex == 2)
			{
				betp.Text = "Player 3";
			}
			if (listBox1.SelectedIndex == 3)
			{
				betp.Text = "Player 4";
			}
		}
		private void numericUpDown1_ValueChanged(object sender, EventArgs e)
		{
			label1.Text = "$" + numericUpDown1.Value.ToString();
		}
		private void button5_Click(object sender, EventArgs e)
		{
			ms("Username: " + textBox1.Text + "nMoney: " + money);
		}
		private void ms(string sMessage)
		{
			MessageBox.Show(sMessage);
		}
	}
}

You don't seem to trust the randomness of rand.Next()? And you should really learn to use loops, arrays and helper functions. Your code could be a couple of times shorter that way. But thanks for sharing this with us, it's all right.

Btw, what's your source for C# being the 5th hardest programming language?
Well.
Here.
1.Assembly
2.Binary(C# Is the 5th hardest with out it)
3.C++
4.C
5.C#
And brainfuck? and PL/I? and basic? Please post where do you get that info and i believe that binary is harder than assembler cause you have to write the same in 0 and 1
Kingdaro #45
Posted 15 May 2013 - 09:32 PM
I'll be honest; as much as I dislike it, C/C++ isn't really that difficult as a language, it's just incredibly verbose and restrictive. C# is even easier, I actually like C#.

What I could never grasp the concept of is languages like Lisp and Scheme. I just don't see much of what anyone could make out of list-based languages like these.

I've seen Smalltalk and I don't think I want to see smalltalk ever again.

Then there's f*cking pogoscript, oh my god.
Pharap #46
Posted 15 May 2013 - 09:57 PM
And brainfuck? and PL/I? and basic? Please post where do you get that info and i believe that binary is harder than assembler cause you have to write the same in 0 and 1

Brainfuck is easy.
I also have to agree that writing bytecode and machine code are a lot easier than assembly because you don't have to play around with the semantics of the .text jargon.
As for my experience, I wrote both a brainfuck VM and a Chip8 VM in C#, so I have experience with both.
Also, writing in binary is not the same as writing in ones and zeros, it's a tad more complicated than than just ones and zeroes as you're usually working with one byte at a time instead of the individual bits.


I'll be honest; as much as I dislike it, C/C++ isn't really that difficult as a language, it's just incredibly verbose and restrictive. C# is even easier, I actually like C#.

What I could never grasp the concept of is languages like Lisp and Scheme. I just don't see much of what anyone could make out of list-based languages like these.

I've seen Smalltalk and I don't think I want to see smalltalk ever again.

Then there's f*cking pogoscript, oh my god.

I hold a similar standpoint. I've tried and used both C and C++, and while I can see the rule-breaking features they have that makes code faster and more flexible, when you sum up the compile time, the obscure errors and the length of time it takes to write things, I came to the conclusion that currently there's nothing in C/C++ at the moment that I want to do that I couldn't in C#.

Fun fact, despite popular belief, C# does have support for pointers, they are just limited use because the garbage collector shifts objects around so you can't point to them without pinning them down, which can have negative memory impact. Structs and value type however are yours to do with as you please. You can actually save time and memory by passing pointers to structs instead of the structs themselves. Another fun trick is the ability to allocate an array on the stack instead of the heap.

I wouldn't mind an implementation of C# that used explicit heap allocation instead of a garbage collector, but I would probably only use it for memory/time critical programs since not having to worry about things like that makes it easier.
*end rambling*
nitrogenfingers #47
Posted 15 May 2013 - 10:27 PM
What I could never grasp the concept of is languages like Lisp and Scheme. I just don't see much of what anyone could make out of list-based languages like these.

I have an anecdote that relates to this.

About 2 weeks ago a friend of mine and myself attempted to teach another friend how to program C. He's a first year here, and has only been exposed to Haskell and a bit of LISP.

He found the lack of nesting to be overly drawn out and verbose, the syntax to be ugly and it took him a full 30 minutes to understand iteration; He'd never used a loop before and just could not get his head around how they work. When we told him 'you're changing the variable each time', he told us 'you just blew my mind'.

I went back about 4 hours later to see he'd given up on the pursuit and was discussing implementations of some monadic functions for his wireworld simulation.

What's the best language of them all? 80% of the time: the first language you learnt thoroughly. I myself have spent very little time with declarative programming and I don't really think it's my cup of tea but there's a generation of programmers beneath my feet whom get on well enough with it, and whom think procedural programming is sorcery. So it's all perspective I think.
GravityScore #48
Posted 16 May 2013 - 01:21 AM
What's the best language of them all? 80% of the time: the first language you learnt thoroughly.

Wow, I just realised how true that is…

No wonder I can't stand Python.
Pharap #49
Posted 16 May 2013 - 07:51 PM
What's the best language of them all? 80% of the time: the first language you learnt thoroughly. I myself have spent very little time with declarative programming and I don't really think it's my cup of tea but there's a generation of programmers beneath my feet whom get on well enough with it, and whom think procedural programming is sorcery. So it's all perspective I think.

Only partly true. You'd have to extend it to the case where a language is similar to the first language you learnt. Though even that is only partly true.

The first language I was taught (and subsequently the first I used) was Visual Basic, and I used if for a few months before I found C# and decided I liked it so much more (I'm a big fan of symbols over words, saves time).
As a result of knowing C#, I am able to get on with C and C++, even though I still find aspects of memory management and some of the restrictions quite cryptic (like having to explicitly declare a function before using it, which I accept is more the fault of the compilers than the language). Ultimately though, I can use them and doing things with them would be easy providing I took time to learn the standard libraries. Regardless of their speed and some of the flexibility, I still prefer C# though. While anything I currently want to do could be achieved in C or C++, anything I wanted to do I could do in C# just as easily and probably much more quickly.

Despite all that, I still just cannot get on with Java. It's not even the lack of functional programming (events and delegates come in handy), I just don't get on with it at all. I'll learn it one day though, I guarantee. *end anecdotes*
Espen #50
Posted 17 May 2013 - 05:56 AM
Wow, I just realised how true that is…

No wonder I can't stand Python.
I had to learn it from scratch a few years ago when it was required of me for work.
And I gotta say that if you take some time and delve into it via good tutorials (of which there are pretty fun ones, e.g. http://learnpythonthehardway.org/book/) it's actually a very awesome language, especially regarding all kinds of string manipulations.
And setting up services is a breeze as well. I had to create a watchdog service that watches a directory for incoming XML and data files, parse the XML and use that information to copy/move/delete the data files to certain other folders and then create links for these files.

With Python that was a breeze to make, it's possible to keep stuff very simple and modular and there's a lot of syntacitc sugar one can use to compress code.#
I really like python, I wish I would have more opportunity to dabble with it. ^_^/>
Pharap #51
Posted 17 May 2013 - 11:48 AM
Wow, I just realised how true that is…

No wonder I can't stand Python.
With Python that was a breeze to make, it's possible to keep stuff very simple and modular and there's a lot of syntacitc sugar one can use to compress code.#
I really like python, I wish I would have more opportunity to dabble with it. ^_^/>
Python is both loved and loathed in almost equal measure.
jesusthekiller #52
Posted 19 May 2013 - 06:01 PM
Check out Malbolge. This programming language is so complicated that first program in it was made after 2 YEARS! And it even wasn't made by human, it was generated by an computer.

Hello world in Malbolge:

 ('&amp;%:9]!~}|z2Vxwv-,POqponl$Hjig%eB@@>}=<M:9wv6WsU2T|nm-,jcL(I&amp;%$#"
 `CB]V?Tx<uVtT`Rpo3NlF.Jh++FdbCBA@?]!~|4XzyTT43Qsqq(Lnmkj"Fhg${z@>