24/02/15 20:50:19.72 TvfAuxJO0.net
C#コンパイラチーム開発者の回答
URLリンク(stackoverflow.com)
> > why can't the type be inferred when the variable is a constant?
>
> "constant" and "variable" are opposites. const var gives me the shudders to type.
> A constant is a value that never changes and has no storage location; a variable is a storage location whose contents change.
> They're completely different, so don't attempt to combine them.
> The var syntax was chosen to call out "this is a variable", and we're sticking with it.
>
> var can stand in for a specific type declaration, but combining it with const severely muddies the picture of what the compiler does with the value.
> Therefore const var is disallowed to prevent this confusion and you have to explicitly type your constants.