adplus-dvertising
frame-decoration

Question

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

a.

<Serializable()>class sample
{

}

b.

(Serializable())class sample
{

}

c.

[Serializable()] class sample
{

}

d.

None of the mentioned

Answer: (c).[Serializable()] class sample
{

}

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

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

Similar Questions

Discover Related MCQs

Q. Which among the following cannot be a target for a custom attribute?

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

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

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

Q. Attributes could be applied to

Q. The [Serializable()] attributes gets inspected at:

Q. Which of the classes provide the operation of reading from and writing to the console in C#.NET?

Q. Which of the given stream methods provide access to the output console by default in C#.NET?

Q. Which of the given stream methods provide the access to the input console in C#.NET?

Q. The number of input methods defined by the stream method Console.In in C#.NET is?

Q. Select the correct methodS provided by Console.In?

Q. Choose the output returned when read() reads the character from the console?

Q. Choose the output returned when error condition is generated while read() reads from the console.

Q. Choose the object of TextReader class.

Q. Choose the object/objects defined by the Textwriter class.

Q. Choose the methods provided by Console.Out and Console.Error?

Q. Name the exception thrown by read() on failure.

Q. Which of these methods are used to read single character from the console?

Q. Which of these method used to read strings from the console?

Q. Which among the following methods are used to write characters to a string?