Type.GetType(“namespace.a.b.ClassName”) returns null

前端 未结 16 1347
旧巷少年郎
旧巷少年郎 2020-11-22 02:58

This code:

Type.GetType(\"namespace.a.b.ClassName\")

returns null.

and I have in the usings:

using nam         


        
16条回答
  •  孤街浪徒
    2020-11-22 03:26

    Make sure that the comma is directly after the fully qualified name

    typeof(namespace.a.b.ClassName, AssemblyName)
    

    As this wont work

    typeof(namespace.a.b.ClassName ,AssemblyName)
    

    I was stumped for a few days on this one

提交回复
热议问题