Tous les codes sourcespage 15
C#
06 Juin, 2016 à 01:30
#271
public int VoteCount
{
get { return this.VoteCount; }
set { this.VoteCount= value;}
}
// A property that sets and gets itself. Awesome infinite recursion.
Java
05 Juin, 2016 à 01:30
#270
while (true) {
System.out.println("Notch, fix Minecraft!");
}
C#
04 Juin, 2016 à 01:30
#269
public string PrependZeroes(int stringLength, string str)
{
var sb = new StringBuilder();
for (var ix = 0; ix < stringLength; ix++)
{
sb.Append("0");
}
sb.Append(str);
var startIx = sb.Length - stringLength;
if (startIx < 0)
startIx = 0;
return sb.ToString().Substring(startIx, stringLength);
}