TypeloadException with static method

C

cody

my problem is as follows:

abstract class A
{
abstract Foo();
static Doit()
{
A = new B();
}
}

class B : A
{
override Foo(){}
}

When I call B.DoIt(); a Typeloadexception occurs.

I extremely simplified the problem here but you basically see what its going
on. In my little example here the TypeloadException doesn't occur (I cannot
reproduce it without my whole app). But I have to note that I have the
problem since I changed Foo() from virtual to abstract. When I change it
back it works fine.

Any ideas?

--
cody

Freeware Tools, Games and Humour
http://www.deutronium.de.vu
[noncommercial and no ****ing ads]
 
G

Gianluca Varenni

Hi.

I tried your code (I added some public modifiers) and it worked smoothly
with .NET SDK 1.1.

If you want I can send privately the C# source I used.

Have a nice day
GV
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top