Free Republic
Browse · Search
General/Chat
Topics · Post Article

To: antiRepublicrat
In what way? Must be a feature I've never used. It does do automatic casting in many cases, but that's about all I've seen.

You can use var instead of a type and the compiler will infer the type (aka duck typing).

In looking up var, I found C#'s version of dynamic typing, which is a type itself (I think it's roughly equivalent to C's void*).

76 posted on 07/07/2009 4:41:24 PM PDT by dan1123 (Liberals sell it as "speech which is hateful" but it's really "speech I hate".)
[ Post Reply | Private Reply | To 73 | View Replies ]


To: dan1123
You can use var instead of a type and the compiler will infer the type (aka duck typing).

I see, new for version 3.0. I wonder why they put it there. The example is bad IMHO, because you should know the types you're getting from the database. There goes Microsoft, always wanting to add more features, screwing things up in the process.

77 posted on 07/07/2009 4:52:52 PM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 76 | View Replies ]

Free Republic
Browse · Search
General/Chat
Topics · Post Article


FreeRepublic, LLC, PO BOX 9771, FRESNO, CA 93794
FreeRepublic.com is powered by software copyright 2000-2008 John Robinson