Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Override type of List in property
Message
From
28/11/2008 04:45:45
 
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01364365
Message ID:
01364458
Views:
9
>>>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform