我已經在論壇中查找了我的問題,並說了一些關於它的私人內容,但我已將所有方法和類都公開,但仍然出現此錯誤:與公共領域不一致的可訪問性錯誤
Error1 Inconsistent accessibility: field type '
A_Day_at_the_races.Bet
' is less accessible than field 'A_Day_at_the_races.Guy.MyBet
'
這是我的代碼:
public class Guy
{
public string Name; // The Guy's name
public Bet MyBet; // An instance of Bet() that has his bet
public int Cash; //How much cash he has
// GUI controls on the form
public RadioButton MyRadioButton; // My RadioButton
public Label MyLabel; // My Label
}
向我們展示Bet類的定義。 –