| Lets Play 20 quick C# questions which generally asked in most of the companies for screening candidates in first round of interview. Lets see how much you are aware of C#. Go through each questions and try to find answers yourself and match your answer with the correct answers given at the end of the post.
|
-
kind of type is a string?
- kind of type is a double?
- keyword defines a custom value type?
- Can a class have more than one direct base class?
- keyword makes a member visible to inherited classes?
- keyword makes a class visible only within its assembly?
- keyword allows a method to be overridden?
- keyword requires a method to be overridden?
- keyword prevents a class from being used as a base class?
- keyword returns true if a cast will succeed?
- keyword returns null if a cast will not succeed?
- keyword ensures code execution even if an exception occurs?
- keyword calls IDisposable.Dispose?
- keyword constrains a generic type argument to derive from a particular class?
- two keywords used together return IEnumerable?
- keyword would you use to define an inline variable in a LINQ query?
- keyword brings an extension method into scope?
- keyword do you add to a delegate to force subscribers to use += or –=?
- method do you call on a delegate to run it on a background thread?
- keyword provides thread synchronization?
|
Answers to questions
|
- reference
- value
- struct
- no
- protected
- internal
- virtual
- abstract
- sealed
- is
- as
- finally
- using
- where
- yield return
- let
- using
- event
- BeginInvoke
- lock
|
* Thanks to Tony Sneed for providing such nice questions.
|
Comments
Post a Comment
Thanks for your valuable feedbacks.Keep visiting the blog...