Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can I overload override methods/properties?
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
00976420
Message ID:
00976464
Vues:
7
Neil,
Thanks for your reply. I must have either missunderstood the M$ docs or somehow throught that you could overload based on different return type. I know I have read that the out keyword can be used to overload a method, but thanks for bringing it to my attention.

Sincerely,
Einar
>Einar,
>
>You can't overload methods by return value but you can overload the method signature/parameter list and use the C# out keyword on parameter by parameter basis. This will allow you to propogate a single/series of values back to the caller and still return a value. The following snippet is taken from MSDN:-
>
>class MyClass
>{
>   public void MyMethod(int i) {i = 10;}
>   public void MyMethod(out int i) {i = 10;}
>}
>
>
>Regards
>Neil
Semper ubi sub ubi.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform