adplus-dvertising
frame-decoration

Question

What will be the output of the following code snippet?
class UseTypeof 
{
    static void Main() 
    {
        Type t = typeof(StreamReader);
        Console.WriteLine(t.FullName);
        if(t.IsClass) Console.WriteLine("Is a class.");
        if(t.IsAbstract) Console.WriteLine("Is abstract.");
        else Console.WriteLine("Is concrete.");
    }
}

a.

Is a class
Is abstract

b.

Is abstract

c.

System.IO.StreamReader
Is a class
Is concrete

d.

Both a & c

Posted under C# programming

Answer: (c).System.IO.StreamReader
Is a class
Is concrete

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the following code snippet?

Similar Questions

Discover Related MCQs

Q. Which feature enables to obtain information about the use and capabilities of types at runtime?

Q. Choose the namespace which consists of classes that are part of .NET Reflection API:

Q. Choose the correct statement about System.Type namespace:

Q. Choose the class from which the namespace ‘System.Type’ is derived:

Q. What does the following property signify?

MemberTypes MemberType

Q. The property signifies “Obtains a Module object that represents the module (an executable file) in which the reflected type resides”. Choose the property which specifies the following statement:

Q. Choose the method defined by MemberInfo:

Q. What does the following declaration specify?

MethodInfo[] GetMethods()

Q. What does the following code specify?

object Invoke(object obj, object[] parameters)

Q. What does the following method specify?

Type[] GetGenericArguments()

Q. Select the type of multitasking methods that exist:

Q. Choose the correct statement about process-based multitasking:

Q. Choose the statements which indicate the differences between the thread based multitasking and process based multitasking:

Q. What is the advantage of the multithreading program?

Q. Select the two type of threads mentioned in the concept of multithreading:

Q. Number of threads that exists for each of the processes that occurs in the program:

Q. Choose the namespace which supports multithreading programming:

Q. What does the given code snippet specify?

public Thread(ThreadStart start)

Q. Which of these classes is used to make a thread?

Q. On call of which type of method the new created thread will not start executing?