Sha256: 2b99eaf9a0d33293cec63a82eb2257c778c30099dfc84081ffe3dd89c228d903

Contents?: true

Size: 527 Bytes

Versions: 396

Compression:

Stored size: 527 Bytes

Contents

using System;

public class Robot
{
    private static readonly Random Random = new Random();

    public string Name { get; private set; }

    public Robot()
    {
        Reset();
    }

    private static string GenerateName()
    {
        return GetRandomCharacter() + GetRandomCharacter() + Random.Next(1000).ToString("000");
    }

    private static string GetRandomCharacter()
    {
        return ((char)('A' + Random.Next(26))).ToString();
    }

    public void Reset()
    {
        Name = GenerateName();
    }
}

Version data entries

396 entries across 396 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.179 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.178 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.177 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.176 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.175 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.174 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.173 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.172 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.171 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.170 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.169 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.167 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.166 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.165 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.164 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.163 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.162 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.161 tracks/csharp/exercises/robot-name/Example.cs
trackler-2.2.1.160 tracks/csharp/exercises/robot-name/Example.cs