By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,035 Members | 1,543 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,035 IT Pros & Developers. It's quick & easy.

Which of the following is or reference type

100+
P: 375
Hi All,
I am asking to the forum after a long hiatus. Happy New Year to all.
I saw one of the questions posted in an interview as below

Which of the following is a reference type.
1. String
2. System.Object
3. Exception
4. Nullable Method

And we have to choose only one answer, Kindly let me the right answer.

Regards
cmrhema
Jan 9 '09 #1
Share this Question
Share on Google+
2 Replies


10K+
P: 13,264
Welcome back.
Verify that the question said only one because both String and Exception inherit from System.Object and both (including System.Object) are reference types. There is no such thing as a Nullable method in C#. Loosely speaking though a nullable method will be one that is capable of returning null. Only reference types and nullable types can have a value of null so in that sense 4 would be valid as well.

PS: hiatus is a cool word
Jan 9 '09 #2

100+
P: 375
Thanks r035198x. Yes even we were confused when they were asking to choose one of the options. But I am 100% sure of it.
Jan 9 '09 #3

Post your reply

Sign in to post your reply or Sign up for a free account.