Forum C# "dynamic" keyword

"dynamic" keyword

Postby Vania » July 25th, 2012, 5:17 pm

I found that you cannot use the dynamic keyword because the Microsoft.CSharp dll cannot be referenced.
Any workaround?

I need it for method overloading.
like this:
Code: Select all
//I have class Base, A : Base, B: Base

dynamic b = ...
mymethod(b); //this only works if b is dynamic

void mymethod(A p);
void mymethod(B p);
Vania
 
Posts: 198
Joined: March 24th, 2010, 9:01 pm

Re: "dynamic" keyword

Postby qugengames » September 19th, 2018, 9:35 pm

I'm having this same issue after almost 6 years.
I need to use Dynamic variables to speed up the game making process of a game I'm working on,

If CSharp.dll can't be used what is the work-around?

Not using Dynamic will make my development a nightmare....
qugengames
 
Posts: 36
Joined: April 24th, 2018, 11:19 pm

Re: "dynamic" keyword

Postby qugengames » October 24th, 2018, 10:48 pm

qugengames wrote:I'm having this same issue after almost 6 years.
I need to use Dynamic variables to speed up the game making process of a game I'm working on,

If CSharp.dll can't be used what is the work-around?

Not using Dynamic will make my development a nightmare....


It's not that bad, I was going to do fancy stuff with the dynamic keyword as well, but ended up using Dictionary from Systems.Collections.
PlayerIO free benefits outweigh the dynamic features
qugengames
 
Posts: 36
Joined: April 24th, 2018, 11:19 pm


Return to C#