What is difference between late binding and early binding in C#?
What is difference between late binding and early binding in C#?
The main difference between early binding and late binding in C# is when the target method is resolved:
Early binding (also known as static binding) resolves the target method at compile-time. The compiler inserts code to directly call the method. If the method doesn't exist, a compile-time error occurs.
Late binding (also known as dynamic binding) resolves the target method at runtime using reflection. The method name is looked up at runtime. If the method doesn't exist, a runtime error occurs.
Đăng nhập để tham gia thảo luận cùng mọi người.
Chưa có bình luận nào
Hãy là người đầu tiên chia sẻ suy nghĩ của bạn.