You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class User
{
public string name { set; get; }
}
publicclass Bai
{
public string code { get; set; }
}
publicclass People
{
public Bai name { get; set; }
}
User user = new User();
user.name = "bai";
TypeAdapterConfig<User, People>.NewConfig().Map(dest => dest.name.code, src => src.name);
People p = user.Adapt<People>();
System.InvalidCastException:“From“System.String”To“DXApplicationTest.dto.Bai”Invalid cast。”
it is same name with User.name and People.name,but it is not same class。how to fix this issue?
The text was updated successfully, but these errors were encountered:
System.InvalidCastException:“From“System.String”To“DXApplicationTest.dto.Bai”Invalid cast。”
it is same name with User.name and People.name,but it is not same class。how to fix this issue?
The text was updated successfully, but these errors were encountered: