ExamVeda
Login
Home
41
Choose the incorrect statement about delegates?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
42
Incorrect statements about delegates are?
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
43
What does the following C# code block defines?
class Gen<T> 
{  
     T ob;    
}
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
44
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!");
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
45
Which among the following is the correct statement about delegate declaration?
delegate void del(int i);
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
46
Are generics in C# are same as the generics in java and templates in C++?
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
47
What will be the output of the following C# code snippet?
public class Generic<T>
{
    Stack<T> stk = new Stack<T>();
    public void push(T obj)
    {
        stk.Push(obj);
    }
    public T pop()
    {
        T obj = stk.Pop();
        return obj;
    }
}
class Program
{
    static void Main(string[] args)
    {
        Generic<string> g = new Generic<string>();
        g.push(30);
        Console.WriteLine(g.pop());
        Console.ReadLine();
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board
48
Which of the given statements are valid about generics in .NET Framework?
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
49
Which of the following statements are valid in the following C# code snippet?
public class Generic<T>
{
    public T Field;
    public void testSub()
    {
        T i = Field + 1;
    }
}
class Program
{
    static void Main(string[] args)
    {
        Genericlt;int>g = new Genericlt;int>();
        g.testSub();
    }
}
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
50
Choose the correct way to call subroutine fun() of the sample class?
class a
{
    public void x(int p, double k)
    {
        Console.WriteLine("k : csharp!");
    }
}
Discuss
Answer & Solution
Answer: Option B
No explanation is given for this question. Let's Discuss on Board