26 lines
498 B
C#
26 lines
498 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace De.Lambertz.Essentials
|
|
{
|
|
public class LamList<T> : List<T>
|
|
{
|
|
public bool AddIfNew(T item)
|
|
{
|
|
bool result;
|
|
|
|
if (this.Contains(item))
|
|
{
|
|
result = false;
|
|
}
|
|
else
|
|
{
|
|
result = true;
|
|
this.Add(item);
|
|
}
|
|
|
|
return result;
|
|
}
|
|
}
|
|
} |