Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sub names
Message
De
14/02/2011 04:37:38
 
 
À
14/02/2011 04:26:27
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Divers
Thread ID:
01500059
Message ID:
01500061
Vues:
39
>>Hi
>>
>>I've found in one of the modules I'm looking at there are duplicate sub routine names (below)
>>I'm suprised this isn't flagged as an error.
>>
>>Is this permissible in .NET. It seems quite confusing to me.
>>
>>Nick
>>
>>
>>
>>Private Sub plotPointBounce(ByVal monthRow As DataRow, ByVal seriesName As String)
>>
>>Private Sub plotPointBounce(ByVal month As DateTime, ByVal seriesName As String, ByVal bounceRate As Double, _
>> ByVal inWarrantyRatio As Double)
>
>Standard method overloading... If the parameters are different then the signature is different. It would be likely that a call to the first example will simply add some default values for bounceRate and inWarrantyRatio before calling the second.

I see that

But if you always go through A to get to B why bother.

I guess I'm missing the point of overloading.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform