Remove the =
in RemainHP
. Right now it is equivalent to
Health = Health - Injured;
return Health;
You want
return Health - Injured
More Related Contents:
- C# – How to convert variables? (String, int, etc.) [duplicate]
- Analog of Visual Studio Solution for my application
- visual studio 2008: HELP lost data! [closed]
- c# when pressing a button add totals together [closed]
- What are the correct version numbers for C#?
- Will using ‘var’ affect performance?
- Type or namespace name does not exist [closed]
- How to enable C# 6.0 feature in Visual Studio 2013?
- What is the best way to dump entire objects to a log in C#?
- How do you find all implementations of an interface?
- How to run unit tests (MSTest) in parallel?
- How do you get a variable’s name as it was physically typed in its declaration? [duplicate]
- Regarding local variable passing in Thread
- Regex to match all us phone number formats
- How do you pass variables from c# to javascript?
- Additional Setup in Visual Studio Installer Projects
- The imported project “C:\Microsoft.CSharp.targets” was not found
- Non-nullable property must contain a non-null value when exiting constructor. Consider declaring the property as nullable
- Calling a Variable from another Class
- update-database: “A network-related or instance-specific error occurred while establishing a connection to SQL Server”
- Which files in a Visual C# Studio project don’t need to be versioned?
- Is there a format code shortcut for Visual Studio?
- Visual Studio C# statement collapsing
- The OutputPath property is not set for this project
- How to programmatically include a file in my project?
- VS2010 – How to automatically stop compile on first compile error
- How to change text in a textbox on another form in Visual C#?
- Read a Registry Key
- Xamarin : Android : System.UnauthorizedAccessException: Access to the path is denied
- Custom Color Palette in Visual Studio Color Property Editor