*
Previous C# Question Answers-31 - 40 C# Question Answers-51 - 60 Next

C# (C-Sharp) Question Answers - 5

41. How to catch all exceptions in C# code?

To catch all exceptions use the base Exception class.

try 
{ 
} 
catch(Exception) 
{ 
}

42. IEnumerable supports 'Custom Query'?

No, IEnumerable does not support 'Custom Query'.

43. IEnumerable supports 'Deferred Execution'?

Yes, IEnumerable supports 'Deferred Execution'.

44. IEnumerable supports 'Lazy Loading'?

No, IEnumerable does not support 'Lazy Loading'.

45. In multiple catch statements the order of each catch clause is important?

Yes, order matters. Catch more specific exceptions before less specific ones. The compiler gives an error if a later block can never be reached.

46. IQueryable supports 'Custom Query'?

Yes, IQueryable supports 'Custom Query' using CreateQuery and Execute methods.

47. IQueryable supports 'Deferred Execution'?

Yes, IQueryable supports 'Deferred Execution'.

48. IQueryable supports 'Lazy Loading'?

Yes, IQueryable supports 'Lazy Loading'.

49. Is it possible to inherit multiple classes in C#?

No. C# does not support multiple inheritance with classes, but multi-level inheritance is possible.

50. Is string a value type or a reference type?

Reference Type

Back to Index
Previous C# Question Answers-31 - 40 C# Question Answers-51 - 60 Next
*
*