Trying to build a Windows 8 App using C# and XAML.
I've created a class:
class Tile
{
public Tile(int ID, string Name, double Frequency, double Divider, int Value, int Turns, int StartLevel)
{
this.ID = ID;
this.Name = Name;
this.Frequency = Frequency;
this.Divider = Divider;
this.Value = Value;
this.Turns = Turns;
this.StartLevel = StartLevel;
}
private int ID { get; set; }
private string Name { get; set; }
private double Frequency { get; set; }
private double Divider { get; set; }
private int Value { get; set; }
private int Turns { get; set; }
private int StartLevel { get; set; }
}
I've added objects to a list:
List<Tile> tList = new List<Tile>();
tList.Add(new Tile(0, "Example1", 0.08, 1.00, 0, 7, 1));
tList.Add(new Tile(1, "Example2", 0.21, 1.25, 0, 0, 1));
When using standard C#, I'm able to access the properties of an object like such:
foreach (Tile t in tList)
{
int test = t.ID;
}
The Problem:
In my foreach statement above, when I type "t." all that comes up in this list of available elements is:
Equals
GetHashCode
GetType
ToString
I Expect:
The following elements to appear:
ID
Name
Frequency
Divider
Value
Turns
StartLevel
What am I missing here?