Merge pull request #27 from fahadash/master

code smell fix, string comparison
This commit is contained in:
Drew DeVault 2015-03-12 07:08:56 -06:00
commit 12fab84752
1 changed files with 1 additions and 1 deletions

View File

@ -51,7 +51,7 @@ namespace ChatSharp
{
get
{
var channel = Channels.FirstOrDefault(c => c.Name == name.ToLower());
var channel = Channels.FirstOrDefault(c => string.Compare(c.Name, name, StringComparison.OrdinalIgnoreCase) == 0);
if (channel == null)
throw new KeyNotFoundException();
return channel;