Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はこれを変更しました:
List<string> chapterNames = new List<string>();
...これに:
var chapterNames = new List<string>();
...そして、コンパイラから次のメッセージが表示されました。
"コンテキスト キーワード 'var' は、ローカル変数宣言内でのみ使用できます"
簡単な答えは、Microsoft が .NET 3.0 の仕様で var キーワードを導入した方法だからです。
http://msdn.microsoft.com/en-us/library/bb384061.aspx