using System.Collections;
static Hashtable coll = new Hashtable();
public static object GetCacheCollection(String prefisso) {
return coll[prefisso + "Collection"] as object;
public static void SetCacheCollection(object ds, String prefisso) {
coll[prefisso + "Collection"] = ds;
public abstract class BO_BaseMetFindGeneric<U, B>: BaseEB
where U: BO_BaseMetFindGeneric<U, B>, new()
static BO_BaseMetFindGeneric() {
protected static string GetTypeStr<T, R>()
where T : BO_BaseMetFindGeneric<T, R>, new()
return obj.GetType().ToString();
protected static string GetTypeStr()
return new U().GetType().ToString();
public static bool rilettura
if (GetCacheCollection(TypeName + ".rilettura") != null) {
Console.WriteLine(TypeName + ".rilettura" + " --> GetCacheCollection");
return (bool)GetCacheCollection(TypeName + ".rilettura");
Console.WriteLine(TypeName + ".rilettura" + " --> default");
Console.WriteLine(TypeName + ".rilettura" + " --> SetCacheCollection");
SetCacheCollection(value, TypeName + ".rilettura");
public class BO_Test : BO_BaseMetFindGeneric<BO_Test, BaseEB>
public static void Main(string[] args)
Console.WriteLine(GetTypeStr() );
Console.WriteLine("Get rilettura");
Console.WriteLine("rilettura: " + ril);
Console.WriteLine("Set rilettura");
Console.WriteLine("rilettura: " + rilettura);