Re: a problem in transfer a int to Object



Uh-huh. The primitives are not objects, so they don't inherit from
Object thus you can't do that cast. Use primitive's wrappers.

.



Relevant Pages

  • Re: newbie question sabout class design
    ... important is not to inherit from the list class - but rather create a ... overriding the original methods. ... I'm probably doing it wrong because I still have to cast. ... (with no parameter specification) indicates calling the ...
    (comp.lang.pascal.delphi.misc)
  • Re: Activator Question
    ... instance of any classes that inherit from the generic type T. ... concrete class of T. ... can't make this cast. ...
    (microsoft.public.dotnet.framework)
  • Re: How to Type cast ArrayList items to class objects
    ... i will reuse the vb class in c# and from the c# ... library i will return the class object and in vb i will type cast the ... just inherit from the C# class then you can add your function ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Inheriting from array of System.Diagnostics.Process[]
    ... Thank you very much for your quick responses. ... inherit a new class from Process? ... btw - The exception is raised also when I cast a single _Process ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: Testing for a type at runtime.
    ... > A and B inherit from C. ... > C obj = GenerateReply ... > to cast it to an A and the method that I would like to use is 'as'. ... words, for compile-time reasons. ...
    (microsoft.public.dotnet.framework)