📄 highscoreentry.cs
字号:
using System;
namespace AnotherBlock
{
/// <summary>
/// Represents a high score entry.
/// </summary>
public struct HighScoreEntry
{
/// <summary>
/// Private attribute that holds the name of a high score entry.
/// </summary>
private string name;
/// <summary>
/// Private attribute that holds the score of a high score entry.
/// </summary>
private int score;
/// <summary>
/// Property that holds and sets the name of a high score entry.
/// </summary>
public string Name
{
get
{
// Returns the value in the name attribute.
return name;
}
set
{
// Sets the name attribute to the value.
name = value;
}
}
/// <summary>
/// Property that holds and sets the score of a high score entry.
/// </summary>
public int Score
{
get
{
// Return the value in the score attribute.
return score;
}
set
{
// Sets the score attribute to the value.
score = value;
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -