我是 c# 的新手,请纠正我的错误
我正在尝试创建一个具有 Nullable 属性的类,但它在构建我的类看起来像的类时出错
public class vwAcdAdmissionWithvwAcdAdmissionSessionDetailWithAllMaster1
{
public Nullable<string> Name { get; set; }
public Nullable<string> StudentNameWithLedgerName { get; set; }
public Nullable<decimal> AASDid { get; set; }
public Nullable<decimal> StudentLedgerId { get; set; }
public Nullable<string> LedgerName { get; set; }
public Nullable<decimal> SessionId { get; set; }
public Nullable<string> ScholarNo { get; set; }
public Nullable<decimal> ClassId { get; set; }
public Nullable<decimal> SectionId { get; set; }
public Nullable<decimal> MediumId { get; set; }
public Nullable<decimal> StreamId { get; set; }
public Nullable<decimal> HouseId { get; set; }
public Nullable<decimal> FeeCategoryId { get; set; }
public Nullable<decimal> SchemeId { get; set; }
public Nullable<decimal> RollNo { get; set; }
public Nullable<decimal> SchoolId { get; set; }
public Nullable<decimal> UserId { get; set; }
public Nullable<decimal> ShiftId { get; set; }
public Nullable<string> StreamName { get; set; }
public Nullable<string> ClassName { get; set; }
public Nullable<string> HouseName { get; set; }
public Nullable<string> SectionName { get; set; }
public Nullable<string> ShiftName { get; set; }
public Nullable<string> MediumName { get; set; }
public Nullable<string> FeeCategoryName { get; set; }
public Nullable<string> DiscountType { get; set; }
public Nullable<decimal> Discount { get; set; }
}
错误是错误是
我不明白它的含义以及我现在可以做什么
请建议我并感谢您的宝贵反馈
The type 'string' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method 'System.Nullable<T>'
我想让我的字符串可以为空的原因类似于我之前的帖子
上一篇
它在返回不可为空的字符串时给出错误