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

To: dan1123
Just so you know, C# has duck typing.

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.

73 posted on 07/07/2009 4:08:01 PM PDT by antiRepublicrat
[ Post Reply | Private Reply | To 70 | View Replies ]


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 ]

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