Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and the Yahoo Answers website is now in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
what does "Implements" mean in asp.net?
what does "Implements" mean in asp.net
Example:
Implements System.Web.UI.ICallbackEventHandler
The language is VB.Net
4 Answers
- 1 decade agoFavorite Answer
The Implements keyword is used when you want a class to inherit the methods/properties of an Interface or abstract base class. This would be mean that the class/methods that are defined with the Implement keyword are going to take the general construct of the interface. For classes this would mean properties, methods, and access types. For methods, the methods would inherit access type, parameters and return values. But the function who is implementing the interface can generally do anything it wants as long as it follows the interface construct. So you could have many classes implement a single interface and each class could implement the function differently. Using hte example below, the IAutomobile interface provides the function GetVIN. This interface funtion does not perform any computations, but rather declares the parameters and return type of the function. The GM and FORD class both implements the IAutomobile interface as well as its GetVIN function. But as you see the FORD and GM GetVIN function returns different values.
Public Interface IAutomobile()
Function GetVIN() As String
End Interface
Public Class GM
Implements IAutomobile
Public Function GetVIN() as String Implements IAutomobile.GetVIN
return "GM VIN"
End Function
End Class
Public Class FORD
Implements IAutomobile
Public Function GetVIN() as String Implements IAutomobile.GetVIN
return "FORDVIN"
End Function
End Class
PS: To the post above me that says VB.NET sucks and an language based off Basic sucks must have limited knowledge to the .NET framework. VB.NET is very powerful thanks to the .NET framework and a lot of the short-commings of VB have been fixed in VB.NET. The only issue that I have with VB.NET these days is that it is to wordy. While I prefer C#, VB.NET performs very nicely. Now... if you are refering to VBA you might have some point to stand on :-P
Thanks Pfo :-) You are correct. It has been a long time since I have used abstract base classes in VB.NET.
Source(s): BS in Computer Science Employed as developer/code migration specialist - PfoLv 71 decade ago
Slight correction: Implements only applies to interfaces, for classes, abstract or otherwise, the Inherits keyword is used.
- HandyManOrNotLv 61 decade ago
If you implement an an abstract class or interface, you must implement those methods declared in the abstract or interface, usually with the same method signature.
- 1 decade ago
basic sucked.
Any language that is made into a visual language sucks.
The .net framework... you guessed it guys.... sucks.....
Why use vbnet?