开发者

What is difference between static and dynamic variables in C#? [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_JAVA百科 Closed 12 years ago.

Could you some one explain me detailed difference between static type and dynamic variables in C#?

static i mean is (static type) general variable. And also how dymanic variable is different from var and object?


In this video talk, Anders Hejlsberg, does a great job in explaining what the dynamic variables are in the new C# 4.0.

http://channel9.msdn.com/Blogs/matthijs/C-40-and-beyond-by-Anders-Hejlsberg

What is difference between static and dynamic variables in C#? [closed]


Dynamic variables are seen as type Object in your source code and any members that you access from them are bound at run time. Static variables have their types known at compile-time, and hence member accesses are directly placed into the assembly at compile-time.


A dynamic variable is a variable whose address is determined when the program is run.A static variable has memory reserved for it at compilation time.

In terms of ASP.Net the Static variable is equalent to the Application variable.


The type of a dynamic variable is resolved at run-time.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜