Try running a query that actually makes the engine do something where the stats might be useful (e.g. The new calculation is only used if trace flag 2371 is enabled, except on SQL Server 2016 when the context database compatibility level is set to 130, where it is the default behaviour.
A statistics update is triggered when optimization finds that interesting statistics for the query are stale.
The optimizer does not enter cost-based optimization for very simple ("trivial") queries, where a single obvious plan is always optimal. See the Microsoft White Paper Plan Caching and Recompilation in SQL Server 2012 by Greg Low.
Watch with "View page source code" always at the html generated.
Looks good : The output after submit : Other actions only when it is working properly until then.
The improved calculation is only used in versions prior to 2016 if you have Trace Flag 2371 on.
Stats don't update when data is modified, they update after data is modified and a query needs to use them (assuming they've met the modification threshold). SELECT * without a WHERE clause) won't trigger a stats update.
To String() , say random number is three which means enemy Race.
To String() will be equal to 4th element in enemy Race array i.e "Gnome ".
When the string array enemy Race chooses one of the options I have a block of if-statements made to modify the health, defense, and money of whatever race is chosen. (How do you think you're randomly choosing a race?
Once that is finished it should display that information at the bottom in the Enemy Stats() method but it doesn't, all stats show up as 0. I'm still new to C# so any guidance will be appreciated. The only aspect that's random at the moment is the class...
The majority of the code isn't relevant here - please show a complete program, but just what's required to demonstrate the problem.