dotnet / dotnet/vblang

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

Open
#300 14 comments 3 reactions 0 assignees View on GitHub
LDM Reviewed: Rejected
Dominant language
No language data
Stars
328
Forks
71
PR merge metrics
No merged PRs in 30d

Description

I wrote a C# function like this:
```
int SizeOf()
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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.