← 回筆記列表
後端

開發經驗

public string Title; // 這是「欄位 (Field)」,就像 JS 裡的一般變數

  • C#
  • Practice

1. 甚麼是{get;set;}

欄位 (Field) vs. 屬性 (Property)

public string Title; // 這是「欄位 (Field)」,就像 JS 裡的一般變數
public string Title { get; set; } // 這是「屬性 (Property)」