Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type.GetInterfaces返回值与CLR不一致 #737

Open
man75319 opened this issue Oct 26, 2022 · 0 comments
Open

Type.GetInterfaces返回值与CLR不一致 #737

man75319 opened this issue Oct 26, 2022 · 0 comments

Comments

@man75319
Copy link

interface IA
{

}

class A : IA
{

}

class B : A
{

}

static void TestGetInterfaces()
{
var type = typeof(B);
Debug.Log($"TypeB's interface count : {type.GetInterfaces().Length}"); //Output -> CLR:1, ILR:0
}

type.GetInterfaces().Length期望返回1(即IA),实际返回0

Unity Version
2020.3.36f1

ILRuntime Version
2.0.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant