Click here to Skip to main content
14,268,557 members
   

C#

 
AnswerRe: download files Pin
Member 1447263829-May-19 0:23
memberMember 1447263829-May-19 0:23 
GeneralRe: download files Pin
Richard MacCutchan29-May-19 1:35
protectorRichard MacCutchan29-May-19 1:35 
AnswerRe: download files Pin
Richard Deeming29-May-19 0:42
mveRichard Deeming29-May-19 0:42 
QuestionC# using get set. Why is this failing? Pin
Brian_TheLion28-May-19 19:52
memberBrian_TheLion28-May-19 19:52 
AnswerRe: C# using get set. Why is this failing? Pin
Member 1356638328-May-19 20:14
memberMember 1356638328-May-19 20:14 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion28-May-19 20:22
memberBrian_TheLion28-May-19 20:22 
GeneralRe: C# using get set. Why is this failing? Pin
Member 1356638328-May-19 20:31
memberMember 1356638328-May-19 20:31 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion28-May-19 20:37
memberBrian_TheLion28-May-19 20:37 
This is the code that player.cs is called from.
I added a TEST button.
lblGold.text is a label on the form.

<pre lang="c#">
using Engine;

namespace SuperAdventure
{
public partial class SuperAdventure : Form
{
private Player _player;

public SuperAdventure()
{
InitializeComponent();

Location location = new Location(1, "Home", "This is your house.");


_player = new Player(10, 10, 20, 0, 1);

Update();

}

private void btnTest_Click(object sender, EventArgs e)
{
_player.Gold = 30;
// lblGold.Text = _player.Gold.ToString();
Update();
}
public void Update()
{
lblHitPoints.Text = _player.CurrentHitPoints.ToString();
lblGold.Text = _player.Gold.ToString();
lblExperience.Text = _player.ExperiencePoints.ToString();
lblLevel.Text = _player.Level.ToString();
}
}
}</pre>
AnswerRe: C# using get set. Why is this failing? Pin
lmoelleb28-May-19 20:39
memberlmoelleb28-May-19 20:39 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 0:24
memberBrian_TheLion29-May-19 0:24 
GeneralRe: C# using get set. Why is this failing? Pin
lmoelleb29-May-19 2:27
memberlmoelleb29-May-19 2:27 
AnswerRe: C# using get set. Why is this failing? Pin
Member 1356638329-May-19 5:30
memberMember 1356638329-May-19 5:30 
GeneralRe: C# using get set. Why is this failing? Pin
Dave Kreskowiak29-May-19 7:18
mveDave Kreskowiak29-May-19 7:18 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 14:50
memberBrian_TheLion29-May-19 14:50 
GeneralRe: C# using get set. Why is this failing? Pin
Dave Kreskowiak29-May-19 16:23
mveDave Kreskowiak29-May-19 16:23 
GeneralRe: C# using get set. Why is this failing? Pin
Member 798912229-May-19 4:38
memberMember 798912229-May-19 4:38 
GeneralRe: C# using get set. Why is this failing? Pin
Richard MacCutchan29-May-19 5:58
protectorRichard MacCutchan29-May-19 5:58 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 14:44
memberBrian_TheLion29-May-19 14:44 
GeneralRe: C# using get set. Why is this failing? Pin
Dave Kreskowiak29-May-19 16:26
mveDave Kreskowiak29-May-19 16:26 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 18:23
memberBrian_TheLion29-May-19 18:23 
GeneralRe: C# using get set. Why is this failing? Pin
lmoelleb2-Jun-19 22:46
memberlmoelleb2-Jun-19 22:46 
AnswerRe: C# using get set. Why is this failing? Pin
OriginalGriff28-May-19 20:41
protectorOriginalGriff28-May-19 20:41 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 0:36
memberBrian_TheLion29-May-19 0:36 
GeneralRe: C# using get set. Why is this failing? Pin
Pete O'Hanlon29-May-19 0:43
protectorPete O'Hanlon29-May-19 0:43 
GeneralRe: C# using get set. Why is this failing? Pin
Brian_TheLion29-May-19 14:41
memberBrian_TheLion29-May-19 14:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.