Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
1.23/5 (6 votes)
Please tell me difference between Implicitly type variable, Named Type variable, Var Type variable, Anonymous Type variable, Dynamic Type variable?
Posted
Comments
Tomas Takac 23-Dec-15 7:08am    
This is documented very well I think. Unless you have a specific question I suggest you start googling. Few examples here on CodeProject:
Difference between Object, Dynamic and Var[^]
Dynamic vs. Var vs. Object[^]
BillWoodruff 23-Dec-15 7:52am    
What is stopping you from doing basic research on the web, or in any introductory book on C# and learning, rather than asking people to spoon-feed you as if you were helpless ?
Rahul Masalkar 23-Dec-15 7:57am    
@BillWoodruff
Thank you for suggestion, These are the referred links with MSDN links too:
http://www.codeproject.com/Tips/460614/Difference-between-var-and-dynamic-in-Csharp
http://geekswithblogs.net/BlackRabbitCoder/archive/2012/06/21/c.net-little-wonders-the-joy-of-anonymous-types.aspx
http://www.c-sharpcorner.com/UploadFile/b1df45/var-vs-dynamic-keywords-in-C-Sharp/
https://midnightcubicle.wordpress.com/2012/04/20/c-anonymous-and-dynamic-types/
http://programmers.stackexchange.com/questions/42863/explicitly-defining-variable-data-types-vs-using-the-keyword-var
http://blogs.msdn.com/b/jennifer/archive/2010/06/16/what-is-the-difference-between-var-and-dynamic-in-c.aspx
http://www.c-sharpcorner.com/UploadFile/013102/C-Sharp-object-versus-var-versus-dynamic/

Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
In future, please try to do at least basic research yourself, and not waste your time or ours.

This is your homework, and it's something you need to understand - so start reading, start learning and write up your own ideas, not mine! :laugh:
 
Share this answer
 
Comments
Sagar Kute 23-Dec-15 7:46am    
I think I haven't seen difference for all 4 types together. It is acceptable that Google Search is 1st option, but you should think of "Codeproject.com" should be the 1st option for every programmer.
OriginalGriff 23-Dec-15 8:03am    
No - Google is the first option, otherwise you waste everybodies time.
If you want to post a discussion of various variable types, then that is what articles and tips are there for - permanent records of information.
But even then, his "solution" of just copy and pasting quotes from MSDN would not get through. :laugh:
Please refer this blogger link for tabular difference,

Difference between Implicitly type, Named Type, Var Type, Anonymous Type, Dynamic Type[^]
 
Share this answer
 
Comments
Rahul Masalkar 23-Dec-15 8:51am    
Links Related to topic:
http://www.c-sharpcorner.com/UploadFile/b1df45/var-vs-dynamic-keywords-in-C-Sharp/
https://midnightcubicle.wordpress.com/2012/04/20/c-anonymous-and-dynamic-types/
http://stackoverflow.com/questions/17991907/implicitly-typed-vs-anonymous-type

Thanks all for suggestion and help.
Philippe Mori 7-May-16 15:56pm    
The referenced table does not have any samples and not complete.

For example, one could use object and non generic list...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900