Skip to content
This repository has been archived by the owner on Jan 16, 2022. It is now read-only.

Commit

Permalink
Fix mistake in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Abrynos committed Aug 9, 2021
1 parent 6522a3a commit 47c1568
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,15 @@ internal interface MyThirdInterface { }
```

```c#
TypeFactory typeFactory = new ();
// This will work
new TypeFactory.CreateType(typeof(SomeGenericInterface<int>));
typeFactory.CreateType(typeof(SomeGenericInterface<int>));
// This will fail - There are unbound generic parameters
new TypeFactory.CreateType(typeof(SomeGenericInterface<>));
typeFactory.CreateType(typeof(SomeGenericInterface<>));
// This will fail - You can derive from it tho
new TypeFactory.CreateType(typeof(IDisposable));
typeFactory.CreateType(typeof(IDisposable));
// This will fail - TypeFactory is not an interface
new TypeFactory.CreateType(typeof(TypeFactory));
typeFactory.CreateType(typeof(TypeFactory));
```

## FAQ
Expand Down

0 comments on commit 47c1568

Please sign in to comment.