本文整理汇总了C#中Score.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Score.ToString方法的具体用法?C# Score.ToString怎么用?C# Score.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Score
的用法示例。
在下文中一共展示了Score.ToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToStringShouldReturnString
public void ToStringShouldReturnString()
{
var score = new Score(this.playerName, this.points, this.time);
var result = score.ToString();
Assert.IsInstanceOfType(result, typeof(string));
}
示例2: RenderTextBox
protected void RenderTextBox(IGraphics g, float x, float y, float textHeight, string teamName, Score score)
{
var scoreString = score == null ? "" : score.ToString();
this.RenderTextBox(g, x, y, textHeight, teamName, scoreString);
}
示例3: MeasureTextBox
protected NodeMeasurement MeasureTextBox(IGraphics g, float textHeight, string teamName, Score score)
{
var scoreString = score == null ? "" : score.ToString();
return this.MeasureTextBox(g, textHeight, teamName, scoreString);
}
示例4: OnLoadScoresFinished
private void OnLoadScoresFinished (Score[] _scores, Score _localUserScore, string _error)
{
AddNewResult("Load leaderboard scores request finished.");
AppendResult(string.Format("Error= {0}.", _error.GetPrintableString()));
if (_scores != null)
{
int _scoresCount = _scores.Length;
AppendResult(string.Format("Totally {0} score entries were loaded.", _scoresCount));
AppendResult(string.Format("Local user score= {0}.", _localUserScore == null ? "NULL" : _localUserScore.ToString()));
for (int _iter = 0; _iter < _scoresCount; _iter++)
{
AppendResult(string.Format("[Index {0}]: {1}.", _iter, _scores[_iter]));
}
}
}
示例5: ToStringShouldReturnStringInProperFormat
public void ToStringShouldReturnStringInProperFormat()
{
var score = new Score(this.playerName, this.points, this.time);
var result = score.ToString();
var template = string.Format("{0}\t{1}\t{2}", this.playerName, this.points, this.time);
Assert.AreEqual(result, template);
}