You've already forked lidgren-network-gen3
mirror of
https://github.com/lidgren/lidgren-network-gen3.git
synced 2026-05-06 02:11:06 +09:00
Linq namespace usage removed
This commit is contained in:
@@ -26,6 +26,7 @@ using System.Net.NetworkInformation;
|
||||
using System.Net.Sockets;
|
||||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Lidgren.Network
|
||||
{
|
||||
@@ -555,5 +556,18 @@ namespace Lidgren.Network
|
||||
return NetDeliveryMethod.UnreliableSequenced;
|
||||
return NetDeliveryMethod.Unreliable;
|
||||
}
|
||||
|
||||
public static string MakeCommaDelimitedList<T>(IList<T> list)
|
||||
{
|
||||
var cnt = list.Count;
|
||||
StringBuilder bdr = new StringBuilder(cnt * 5); // educated guess
|
||||
for(int i=0;i<cnt;i++)
|
||||
{
|
||||
bdr.Append(list[i].ToString());
|
||||
if (i != cnt - 1)
|
||||
bdr.Append(", ");
|
||||
}
|
||||
return bdr.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user