Content deleted Content added
Correction of C# example |
|||
Line 78:
namespace MyApplication
{
public class Multiton<T> where T : new() // generic multition.
{
private static readonly ConcurrentDictionary<object, T> _instances = new ConcurrentDictionary<object, T>();
Line 86:
public static T GetInstance(object key)
{
return _instances.GetOrAdd(key, (k) => new
}
}
|