When I am trying to use "var" in the WCF Service application it is giving error "The type or namespace name 'var' could not be found (are you missing a using directive or an assembly reference?)"
You get this error if you try to use var
in a class member, e.g.:
public class Foo { var a = 4; }
var
can only be used inside a method, not in classes, fields or method signatures.
See also: Why no var on fields?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With