Using directives and generic code