Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Public MustOverride Function
Message
 
À
24/10/2002 14:29:44
Rex Mahel
Realm Software, Llc
Ohio, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00714807
Message ID:
00715059
Vues:
27
Hi Rex,

The compiler knows to only look for one line of code since you can't put any code inside of the MustOverride function. You are requiring the user to create their own functionality for the method. This is similar to using an interface.

>Cathi,
>
>So the compiler knows that either the next function/sub call or the END CLASS signifies the end of the function?
>
>Thanks
>
>Rex
>
>>Rex,
>>
>>Sorry for the misposting before. When you use the MustOverride attribute, you don't use the End Function. Here is the correct code:
>>
>>
>>Public MustInherit Class Base1
>>
>>    Public MustOverride Function Rex() As Boolean
>>
>>End Class
>>
>>
>>>Cathi,
>>>
>>>Here it is:
>>>
>>>
>>>Public MustInherit Class Base1
>>>
>>>	Public MustOverride Function Rex() As Boolean
>>>	End Function
>>>
>>>End Class
>>>
>>>
>>>Thanks
>>>
>>>Rex
>>>>Can you post your code?
>>>>
>>>>>Cathi,
>>>>>
>>>>>I get the same thing.
>>>>>
>>>>>Any more ideas?
>>>>>
>>>>>TIA
>>>>>
>>>>>Rex
>>>>>
>>>>>>See if you are using the following syntax:
>>>>>>
>>>>>>
>>>>>>Public MustOverride Function MyFunction() As Integer
>>>>>>  ...
>>>>>>End Function
>>>>>>
>>>>>>
>>>>>>>All,
>>>>>>>
>>>>>>>I cannot write a function with MustOverride. I get a blue squiggly on the End Function saying that "'End Function' must be preceded by a matching 'Function'".
>>>>>>>
>>>>>>>How can I do this?
>>>>>>>
>>>>>>>TIA
>>>>>>>
>>>>>>>Rex
-----------------------------------------

Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform