I’m having trouble understanding the dynamic keyword (used .net 2 up til recently).
Can someone please explain what it is for? Perhaps give a simple but real-world example, and explain in what situations in can be used, benefits and drawbacks, etc.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The proper use of dynamic occurs pretty rarely in practice because you only use it if there is no (convenient) type-safe way of doing the same.
For example:
IDproperty by conventionThose are valid use cases but they are not that common.