Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. public class MyType
  2. {
  3. [ContractAnnotation("throwOnNull:true => notnull")]
  4. public static Type GetType(string name, bool throwOnNull)
  5. {
  6. return null;
  7. }
  8. }
  9.  
  10. var type = MyType.GetType("Some.Type", false);
  11. var typeName = type.FullName;
  12.  
  13. var type = MyType.GetType("Some.Type", true);
  14. var typeName = type.FullName;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement