Junior, medior or senior it is always a good thing to evaluate your knowledge and fill in the gaps you may have. Questions always help to emphasize and pay extra attention to some particular aspects. I have tried below to gather a small collection of questions useful when working as a .Net software developer.
- Explain the difference between value and reference types.
- Which of the following are value types? (Choose all that apply)
- A. Decimal
- B. String
- C. System.Drawing.Point
- D. Integer
- Which of the following are reference types? (Choose all that apply)
- A. Types declared Nullable
- B. String
- C. Exception
- D. All types derived from System.Object
- What is the correct order for catch clauses when handling different exception types?
- A. Most general to most specific
- B. Most specific to most general
- C. Most likely to occur to least likely to occur
- D. Least likely to occur to most likely to occur
- You pass a value-type variable into a procedure as an argument. The procedure changes the variable; however, when the procedure returns, the variable has not changed. What happened? (Choose one.)
- A. The variable was not initialized before it was passed in
- B. Passing a value type into a procedure creates a copy of the data
- C. The variable was re-declared within the procedure level
- D. The procedure handled the variable as a reference
- How can you change the value of two integer variables without using a third one?
- Which of the following statements generates a string containing the text “Veni, vidi, vici”?
- A. String.Format(“{0}, {1}, {2}”, Veni, vidi, vici”)
- B. String.Format(“{1}, {2}, {3}”, “Veni”, “vidi”, “vici”)
- C. String.Format(“{2}, {0}, {3}”, “vidi”, “Venti”, “Veni”, “vici”)
- D. String.Format(“{Veni, vidi, vici}”)
- Explain why Array is faster than ArrayList
- What is the difference between == and .Equals() ?
- What is the difference between override and overload ?
- Can you assign NULL to a DataTime variable ?
- What is the difference between an abstract class and an interface ?
- What is the proper way to re-throw an exception, throw or throw ex ?
- What is the difference between Class and Structure ?
- Can multiple inheritance be used in .NET?