To encapsulate more than one method into a single delegate which operator is used
Answers
A delegate in C# is similar to a function pointer in C or C++. Using a delegate allows the programmer to encapsulate a reference to a method inside a delegate. The delegate object can then be passed to code which can call the referenced method, without having to know at compile time which method will be invoked.
i hope help you
Explanation:
✪Hey There✪
Here is your program
SET VERIFY OFF;
DELETE FROM top_salaries;
DEFINE p_num = 5
DECLARE
num NUMBER(3) := &p_num;
sal employees.salary%TYPE;
CURSOR emp_cursor IS
SELECT distinct salary
FROM employees
ORDER BY salary DESC;
BEGIN
OPEN emp_cursor;
FETCH emp_cursor INTO sal;
WHILE emp_cursor%ROWCOUNT <= num AND emp_cursor%FOUND
LOOP
INSERT INTO top_salaries (salary)
VALUES (sal);
FETCH emp_cursor INTO sal;
END LOOP;
CLOSE emp_cursor;
END;/
SELECT * FROM top_salaries;
Hope It Helps.☺️