public virtual T GetAttribute <T>(string attribname) { System.Type clazz = typeof(T); Args.NotNull(clazz, "Attribute class"); object obj = GetAttribute(attribname); if (obj == null) { return(null); } return(clazz.Cast(obj)); }