Re: Newbie question - Disadvantages of java

From: Timo Kinnunen (timo.kinnunen_at_bigfoot.com)
Date: 10/27/03


Date: Mon, 27 Oct 2003 19:56:15 +0200 (EET)


"Thomas G. Marshall"
<tgm2tothe10thpower@hotmail.replaceTextWithNumber.com> wrote:

> xarax <xarax@email.com> coughed up the following:
>
>> The reasoning is that "null" has a built-in type that implicitly
>> inherits from all reference types (the only case of multiple
>> inheritance), and is thus assignable to any reference type
>> and castable to any reference type.
>
> That's NOT "REASONING". That's factual information.
>
> My posts are discussing the /why/ and /what if/, not the /what
> is/.

Perhaps it serves as a hint to implementers to make null reference
such a special object and as a guarantee that this is legal. If null
didn't have a type, this technique would be far less obvious.

-- 
No address munging in use. I like the smell of nuked accounts in the 
morning.


Relevant Pages

  • Re: Working with Cache and Viewstate
    ... The ArrayList class inherits from System.Object with means it is a reference type. ... When you set the value of the ViewState variable, I believe you are passing a reference to the underlying ArrayList object rather than a copy of the object. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Newbie question - Disadvantages of java
    ... >> downwardly assignable to sorts without cast. ... >> Having a type value that is assignable to all object types ... > inherits from all reference types (the only case of multiple ... and is thus assignable to any reference type ...
    (comp.lang.java.programmer)
  • Re: Is StringBuilder class Value type?
    ... up to my level that I have known the StringBuilder class is reference type. ... Someone telling that StringBuilder class is Value type. ... To determine if a type is a valuetype or a reference type, you can look into the MSDN, lookup the type's documentation page, and you can see if it inherits from a class or it is a class itself -> reference type, if it is a struct or if it inherits from System.ValueType, it is a value type. ... My .NET blog: http://weblogs.asp.net/fbouma ...
    (microsoft.public.dotnet.general)
  • Re: How to marshall an array of structures as out parameters?
    ... I assume that when I marshall an array I do not ... >>the ref attribute since an array is an object. ... > "If a reference type is passed by value and it has members of ...
    (microsoft.public.dotnet.framework.interop)