using conditionals on enqueue styles

I want to run my css code on a specific page in admin area. What is the best approach please?

A:

function register_style() {
    if (is_page..something) {
        wp_enqueue_style('style', PLUGIN_URL . 'style.css');
    }
}
add_action('admin_enqueue_scripts', 'register_style');

B:

function register_style() {
    wp_enqueue_style('style', PLUGIN_URL . 'style.css');
}

if (is_page..something) {
    add_action('admin_enqueue_scripts', 'register_style');
}

Solutions Collecting From Web of "using conditionals on enqueue styles"

I’d go for A) (but give that function another name to avoid collisions), because you can be absolutely sure that all manipulation of the request is over once admin_enqueue_scripts is fired. You cannot be sure if you just put it into the functions.php (or where ever this code will live).

I don’t really see a (non-edge-case where somebody is doing something strange) scenario where B) will get you in trouble, but A) is much cleaner imho. A) might (theoretically; humans won’t notice until we evolve quite a bit or you go back down to ancient CPUs) a tiny bit heavier since both the conditional and the action have to be run if the conditional returns false.