Why are the methods in the DynamicObject class not common?

I read this article about Dynamic Objects in C # 4.0 .
In this example, the second argument to the TryGetMember function (GetMemberBinder binder, out result result) is of type Object. I looked at MSDN and noticed that other methods also get arguments like Object. Why are these functions not common?
From MSDN

For simple assignments, boxing and unpacking are computationally expensive processes

If boxing / unpacking is expensive, isn't it better to use generics?

Thank.

+3
source share
1 answer

" ". , , .

, , :)

TryGetMember , , , . , , . :

dynamic foo = GetDynamicValueFromSomewhere();
Console.WriteLine(foo.SomeProperty);

, Console.WriteLine SomeProperty . "" ... ?

, object CLR. :

dynamic x = 10;

. " " CLR. ( ?)

+8

All Articles