5 ms·
var is type inference, not dynamic typing. Unless something has changed since I last C#’d. The docs seem to say this still holds: https://docs.microsoft.com/en-
by jakear 9y ago
var is type inference, not dynamic typing. Unless something has changed since I last C#’d. The docs seem to say this still holds: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var https://docs.microsoft.com/en-us/dotnet/csharp/language-refe...
- coldtea 9y agoI meant this variable declaration: C# Dynamic Type: C# 4.0 (.NET 4.5) introduced a new type that avoids compile time type checking. You have learned about the implicitly typed variable- var in the previous section where the compiler assigns a specific type based on the value of the expression. ... A dynamic type can be defined using the dynamic keyword.Jan 1, 2014