make LINQ statement simpler
This commit is contained in:
parent
7e66691d66
commit
ec872e4aec
@ -4,6 +4,8 @@ namespace EDJournal {
|
||||
public class Credits {
|
||||
public static string FormatCredits(int amount) {
|
||||
var format = CultureInfo.CurrentCulture.NumberFormat;
|
||||
format.NumberGroupSeparator = ",";
|
||||
format.NumberGroupSizes = new int[1] { 3 };
|
||||
if ((amount % 1000000) == 0) {
|
||||
amount /= 1000000;
|
||||
return string.Format("{0}M CR", amount.ToString(format));
|
||||
|
@ -38,9 +38,7 @@ namespace EDJournal {
|
||||
|
||||
public JournalFile GetLastFile() {
|
||||
var lastfile = Files
|
||||
.GroupBy(x => x.Timestamp)
|
||||
.Last()
|
||||
.ToArray<JournalFile>()
|
||||
.OrderBy(x => x.Timestamp)
|
||||
.Last()
|
||||
;
|
||||
return lastfile;
|
||||
|
Loading…
Reference in New Issue
Block a user