jeudi 30 août 2018

how to find the System.Type from a complex full path string?

for example, my Type is a complex type, it is a generic type.

public class TestType<T> : xxx

{ }

this is a generic class in Assmebly A. my Assembly B reference A, there is another type TestObject. so the actual type is : TestType .... if i save the fullname of this type, it is a very complex string, like this:

BluePrint.Core.CustomObjectConverter`1[[BluePrint.SGame.VInt2, BluePrint.SGame.Plugins, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null]], BluePrint.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null

so, if i want to find the System.Type of this string, how to do this? i use System.Type.GetType, it return null. the generic type and the parameter type are in different assemblies.





Aucun commentaire:

Enregistrer un commentaire