Do I need to use { get; set; } with c# fields that have no special actions when getting and setting

前端 未结 8 1251
借酒劲吻你
借酒劲吻你 2021-01-16 04:59

I have been coding classes like this:

public class ReportViewModel
    {
        public string Status;
        public string DataSource;
        public Stri         


        
8条回答
  •  北恋
    北恋 (楼主)
    2021-01-16 05:29

    If you want them properly exposed as properties, yes.

提交回复
热议问题