[英]Display string of Json deserialized variable in label in usercontrol
我有一個反序列化的 Json 在 class “Userinfo”中名為“Uinfo”的變量中,如下所示:
而我的 class 信息我有這個:
public class Information
{
public string username { get; set; }
public string email { get; set; }
public string plan { get; set; }
public string activationdate { get; set; }
public string terminationdate { get; set; }
}
現在我要做的是在用戶控件“dashboardcontrol”的 label 中顯示變量“Uinfo”中的“用戶名”字符串
如何在dashboarcontrol的label11中顯示“Uinfo”中包含的字符串?
將標簽的文本設置為字符串屬性
label11.Text = Uinfo[0].username;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.