public T As <T>() { if (!CurrentValue.GetType().IsAssignableFrom(typeof(T)) && World.Instance.Ktd.ContainsType(Type.Name)) { KtdType typeAsKtdType = World.Instance.Ktd.GetKtdType(Type.Name); Type t = typeof(T); return((T)typeAsKtdType.AssignValuesToNativeType(Value, t)); } else { return((T)Value); } }