I was reading this example: http://blog.ondrejsv.com/post/AppSettingsReader-and-reading-typed-and-nullable-application-settings.aspx and I noticed in this line of code:
int failCount = (int) appSettingsReader.GetValue("FailAttemptCount", typeof(int));
I don’t understand why there is a (int) before appSettingsReader, what it does, etc.
The call to GetValue is designed to return the result as various possible types, but the declared return value is Object. So you tell it to return an int, but then you have to cast the result to
intso you can reference it as such.