Skip to content

Unable to call C# 7.3 method with unmanaged type parameter #300

Open
@Berrysoft

Description

@Berrysoft

I wrote a C# function like this:

int SizeOf<T>() 
    where T : unmanaged
{
    return sizeof(T);
}

But when I tried to call this function in a VB project, the compiler threw a BC30649 exception said:
""is an unsupported type
What should I do to call this function?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions