執行 ❯
獲取您自己的 C# 伺服器
×
更改方向
更改主題,深色/淺色
前往 Spaces
prog.cs
prog2.cs
using System; namespace MyApplication { class Program { static void Main(string[] args) { Car myObj = new Car(); Console.WriteLine(myObj.model); } } }
using System; namespace MyApplication { class Car { private string model = "Mustang"; } }
由於其保護級別,'Car.model' 不可訪問。
欄位 'Car.model' 已賦值,但其值從未被使用。