Bogus
Bogus copied to clipboard
Why do you want to restrict that a generic type must be a class?
Version Information
| Software | Version(s) |
|---|---|
| Bogus NuGet Package | 34.0.2 |
| .NET Core? | .NET 6.0.400 |
| .NET Full Framework? | |
| Windows OS? | Windows 10 Pro |
| Linux OS? | |
| Visual Studio? | Visual Studio 2022 Community |
What locale are you using with Bogus?
en-US
What's the problem?
Faker<T> : IFakerTInternal, ILocaleAware, IRuleSet<T> where T : class
Why do you want to restrict that a generic type must be a class?
In some cases, I use struct...
What possible solutions have you considered?
I have considered using non generic Faker.
Examples:
Using the Faker facade
Using DataSets directly
Do you have sample code to show what you're trying to do?
(Please be complete. Provide all code necessary to run your example in LINQPad.) (The more complete code examples are, the more accurate answers will be.) (https://www.linqpad.net)