Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Override type of List in property
Message
De
28/11/2008 04:45:45
 
 
À
27/11/2008 14:09:43
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01364365
Message ID:
01364458
Vues:
11
>>>Hi,
>>>
>>>>Are you looking for new ?
>>>
>>>Yes! I forgotten about that usage but as soon as I saw the line above I knew what you were suggesting!
>>>
>>>Should work fine. Thanks,
>>>Viv
>>
>>
>>Viv,
>>
>>Hear my confession. I had not forgotten about that usage - I simply didn't know about it.
>>
>>I tried without the new (and the stuff in the main) and whilst debugging OrderB I saw that it still had the 'old' (base) List and that the old List was hidden.
>>
>>In all honesty - it was the compiler that suggested the new keyword
>
>Didn't do it for me :-{
>I spent a while trying to work out why I couldn't do an explicit/implicit type conversion ......
>Seems like my whole day today was taken up with either frustration because I didn't know how to do something or boredom because I did (and had to spend time doing it...)
>
>BTW, it DID work fine.......
>Thx again,
>Viv

Viv,

If you take the code from yesterday and omit the 'new' keyword, then hit F6, I get this
Warning	3	'OrderB.OrderItems' hides inherited member 'Order.OrderItems'. Use the new keyword if hiding was intended.	D:\vs\Project\Test\Test\Test\Test.cs	66	26	Test
Gregory
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform