Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Interface == Early binding?
Message
From
10/08/2005 21:37:50
 
General information
Forum:
ASP.NET
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01040023
Message ID:
01040068
Views:
13
Mike,

If I read what you are asking:
If you were doing this with a class, you would consider this to be late-bound, but with an interface you are not certain?

An interface is really just an abstract class with a pretty name :)

If I define an abstract class and an interface with the same function like this:
	public abstract class Class1
	{
		public Class1()
		{}
		public abstract void function1();
	}

	public interface interface1
	{
		void function1();
	}
The IL generated for these functions is the same:
.method public hidebysig newslot abstract virtual 
        instance void  function1() cil managed
{
} // end of method Class1::function1

.method public hidebysig newslot abstract virtual 
        instance void  function1() cil managed
{
} // end of method interface1::function1
The notion of classes and interfaces is really an abstraction for the programmer.

My understanding of late-bound/early-bound is if you don't know the type until runtime then it is late-bound.
- Craig

"If you're not prepared to be wrong, you will never come up with anything original."
- Sir Ken Robinson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform