Home / MCQ Bank / Computer
Computer Delegates And Events In C Sharp

Which of the following is the correct way to call the subroutine function abc() of the given class in the following C# code? class csharp { void abc() { console.writeline("A:Just do it!"); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option B • delegate void del(); del d; csharp s = new csharp(); d = new del(ref s.abc); d()

Related Computer Questions

What is the space complexity of the recursive implementation used to convert a decimal number to its binary equivalent? #include<stdio.h> int arr[31], len = 0; void recursive_dec_to_bin(int n) { if(n == 0 && len == 0) { arr[len++] = 0; return; } if(n == 0) return; arr[len++] = n % 2; recursive_dec_to_bin(n/2); } Subtitle tracks and caption tracks to be specified for audio and video elements can be added using which of the following element? What is the purpose of the JDBC `DriverManager` class? If the background image is smaller than the screen, what will happen ? In dplyr, what does the slice_sample() function do?