gs gs108 Delegates, Generics and LINQ - Delegates in Detail - Quiz No.1
gs gs108 CSharp Quiz
This quiz belongs to book/course code gs gs108 CSharp of gs organization. We have 110 quizzes available related to the book/course CSharp. This quiz has a total of 10 multiple choice questions (MCQs) to prepare and belongs to topic Delegates, Generics and LINQ. NVAEducation wants its users to help them learn in an easy way. For that purpose, you are free to prepare online MCQs and quizzes.
NVAEducation also facilitates users to contribute in online competitions with other students to make a challenging situation to learn in a creative way. You can create one to one, and group competition on an topic of a book/course code. Also on NVAEducation you can get certifications by passing the online quiz test.
class a { public void x(int p, double k) { Console.WriteLine("k : csharp!"); } }
delegate void del(int i); x s = new x(); del d = new del(ref s.x); d(8, 2.2f);
delegate void del(int p, double k); del d; x s = new x(); d = new del(ref s.x); d(8, 2.2f);
x s = new x(); delegate void d = new del(ref x); d(8, 2.2f);
class csharp { public int abc(int a) { Console.WriteLine("A:Just do it!"); return 0; } }
delegate void del(int a); csharp s = new csharp(); del d = new del(ref s.abc); d(10);
csharp s = new csharp(); delegate void d = new del(ref abc); d(10);
delegate int del(int a); del d; csharp s = new csharp(); d = new del(ref s.fun); d(10);
class csharp { void abc() { console.writeline("A:Just do it!"); } }
csharp c = new csharp(); delegate void d = new del(ref abc); d();
delegate void del(); del d; csharp s = new csharp(); d = new del(ref s.abc); d();
csharp s = new csharp(); delegate void del = new delegate(ref abc); del();
{ delegate void A(ref string str); class sample { public static void fun( ref string a) { a = a.Substring( 7, a.Length - 7); } } class Program { static void Main(string[] args) { A str1; string str = "Test Your C#.net skills"; str1 = sample.fun; str1(ref str); Console.WriteLine(str); } } }
{ delegate string F(string str); class sample { public static string fun(string a) { return a.Replace(',''-'); } } class Program { static void Main(string[] args) { F str1 = new F(sample.fun); string str = str1("Test Your c#.NET skills"); Console.WriteLine(str); } } }
{ delegate string f(string str); class sample { public static string fun(string a) { return a.Replace('k', 'o'); } } class Program { static void Main(string[] args) { f str1 = new f(sample.fun); string str = str1("Test Ykur C#.NET Skills"); Console.WriteLine(str); Console.ReadLine(); } } }