C# Console IO and Stream Classes Mcqs

Our collections of Multiple choice questions and answers focuses on study of C# Console IO and Stream Classes. These questions are chosen from a collection of most authoritative and best reference books on C# Console IO and Stream Classes. Our aim is to prepare an individual for competitive exams like NTS, GAT, ECAT, University and College entrance exams and various tests and job interviews. One should practice our Mcqs to assimilate C# Console IO and Stream Classes comprehensively.

2.
To apply an attribute to an Assembly, the correct way of implementation is?

[AssemblyInfo: AssemblyDescription (“Csharp”)].

[assembly: AssemblyDescription(“Csharp”)].

[AssemblyDescription(“Csharp”)].

[AssemblyDescription(“Csharp”)]

4.
Which among the following is the correct form of applying an attribute?

class sample
{

}

(Serializable())class sample
{

}

[Serializable()] class sample
{

}

None of the mentioned

6.
Select the correct statement about Attributes used in C#.NET?

The CLR can change the behaviour of the code depending on attributes applied to it

If a bugFixAttribute is to recieve three paramteres, then the BugFixAttribute class should implement a zero arguement constructor

To create a custom attribute we need to create a custom attribute structure and derive it from System.Attribute

None of the mentioned

7.
The correct way to apply the custom attribute called Employer which receives two arguements – name of the employee and employeeid is?

Custom attribute can be applied to an assembly

[assembly : Employer(“Hanna”,employeeid.one)].

[ Employer(“Hanna”, employeeid.second)] class employee
{
}

All of the mentioned

8.
Which of the following is the correct statement about inspecting an attribute in C#.NET?

An attribute can be inspected at link time

An attribute can be inspected at design time

An attribute can be inspected at run time

None of the mentioned

0Shares
0
Scroll to Top