
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Dynamic Binding in C#
In Dynamic binding, the compiler will not do type checking at compile time. At run time, the checking is done.
Use it to avoid the restriction of anonymous types to one method. This is only because the type name is visible only to the compiler; therefore, you cannot declare it as the return value of a method.
Example
public dynamic GetAnonymousType() { return new { StudentName = "Tom", Subject = "Java", }; }
Above, the method is set to be dynamic, that would means the compiler won’t do type checking at compile time.
public dynamic GetAnonymousType() { }
- Related Questions & Answers
- Static binding vs Dynamic binding in C#
- What is dynamic binding in C#?
- Static binding and dynamic binding in Java
- Difference between Static binding and dynamic binding in Java
- What is dynamic binding in Java?
- Static vs Dynamic Binding in Java
- What are differences between static binding and dynamic binding in Java?
- Difference Between Static and Dynamic Binding
- Explain the difference between static and dynamic binding in Java.
- Early binding and Late binding in C++
- What is early binding in C#?
- What is late binding in C#?
- What is static binding in C#?
- What is binding and binding time in compiler design?
- What is parameter binding in C# ASP.NET WebAPI?
Advertisements