Enforce coding styles (#2377)

This commit is contained in:
Next Turn 2019-03-06 00:14:06 +08:00 committed by Karel Zikmund
parent 85b7db561b
commit 4b17f38b2d
5 changed files with 51 additions and 52 deletions

View file

@ -8,7 +8,7 @@ public static class Program
if (args.Length > 0)
{
message = String.Join(" ",args);
message = string.Join(" ", args);
}
Console.WriteLine(GetBot(message));
@ -59,5 +59,4 @@ public static class Program
";
return bot;
}
}

View file

@ -12,7 +12,7 @@ public static class Program
}
else if (args.Length > 0)
{
message = String.Join(" ", args);
message = string.Join(" ", args);
}
Console.WriteLine(GetBot(message));
@ -62,5 +62,4 @@ public static class Program
";
return bot;
}
}

View file

@ -7,17 +7,18 @@ namespace Qotd
{
public static void Main(string[] args)
{
if (args.Length <=0)
if (args.Length == 0)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine("You must specify a quotes file.");
Console.ResetColor();
return;
}
var quotes = File.ReadAllLines(args[0]);
var randomQuote = quotes[new Random().Next(0, quotes.Length-1)];
Console.WriteLine("[QOTD]: {0}", randomQuote);
var quotes = File.ReadAllLines(args[0]);
var randomQuote = quotes[new Random().Next(0, quotes.Length - 1)];
Console.WriteLine($"[QOTD]: {randomQuote}");
}
}
}