|
|
Choosing A Webhost: |
Re: Casting question: msg#00180windows.devel.dotnet.cx
Eames, Andrew wrote: The problem is that although B derives from A, B[] does *not* derive While B[] doesn't actually derive from A[], there is array covariance. It's perfectly possible to pass write a method Gimme which returns A[] but which allows B[] b = (B[])Gimme(5); to run without problems. The problem is that array covariance doesn't actually change the type of the array - an A[] isn't necessarily a B[] any more than an A is necessarily a B. You can treat a B[] as an A[], however. Jon =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Casting question, Rick Taylor |
|---|---|
| Next by Date: | Re: Casting question, Kenneth Lee |
| Previous by Thread: | Re: Casting question, Eames, Andrew |
| Next by Thread: | Re: Casting question, Rick Taylor |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business. subscribe Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field. subscribe The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business. subscribe Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company. subscribe Total Telecom Total Telecom is "The Economist of the communications industry". subscribe |