I am having issues on how to assign stock names and respective price on the board positions in a monopoly game in C#, SO far i have only few lines of codes, I need some assistance.
stockname.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WindowsFormsApplication1
{
class stock
{
public string stockname;
public string stockprice;
public string stockposition;
}
}
for my windows form
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 WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
stock newstock = new stock();
newstock.stockname = "ATT";
newstock.stockprice = "20";
newstock.stockposition= "1";
}
}
}