bugDotGNU Portable.NET - Bugs: bug #9851, type-resolving at runtime not...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #9851: type-resolving at runtime not always correct

Submitter:  None
Submitted:  Mon 02 Aug 2004 07:37:12 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Fri 29 Oct 2004 04:19:41 PM UTC, comment #2: 

Can't reproduce this behaviour in any of my samples.

Closing this bug as being too long without any steps towards investigation

Gopal.V <t3rmin4t0r>
Group administrator
Tue 03 Aug 2004 09:28:05 AM UTC, comment #1: 

At least the original code would have been a help.

Right now I'm up a creek without a paddle...

Anonymous
Mon 02 Aug 2004 07:37:12 PM UTC, original submission:  


Working on a little project, I encountered the following
misbehaviour of pnet (most probably ilrun):

I have a reference of an interface type, which I pass
around through some events and methods.
And at some point in the code I want to cast it back
to a class type. But the "is" operator doesn't return
true for the class and casting without checking
throws an exception.
The class overrides the ToString() method, so I can check
that the object is really an instance of this class, and
just before trying to cast, the right ToString() method
is invoked.

The method which tries to cast looks something like:

public void DoSomething(IBlabla obj)
{
// ToString() of class SomeClass is invoked
Console.WriteLine(obj);
if(obj is SomeClass)
{
// This block is never executed...
//  strange but true
Console.WriteLine("obj is of type SomeClass");
}
}

Sorry, but I couldn't track it down to a simple test.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follow 2 latest changes.

Date Changed by Updated Field Previous Value => Replaced by
2004-10-29 t3rmin4t0r StatusNone Works For Me
    Open/ClosedOpen Closed

Back to the top

Powered by Savane 3.13-4b48.
Corresponding source code