Thursday, October 30, 2008

What Every C# .Net Developer Needs To Know (2)


C and C++:


  1. What is a Virtual Function and why is it used?

  2. What is a friend function?

  3. What's the difference between an operator and an operand?

  4. What's the difference between the * and the & in C++?

  5. How do you dynamically allocate memory?

.Net Framework:



  1. What is a garbage collector and how does it work? (Memory management in CLR)

  2. What is the difference between Finalize() and Dispose()?

  3. Multithreading Vs Single-threading?

  4. Thread Vs Process?

  5. Whats a deadlock, how do you manage deadlocks?

  6. What is a Windows Service and how does its lifecycle differ from a "standard" EXE?

  7. What is the maximum amount of memory any single process on Windows can address? Is this different than the maximum virtual memory for the system? How would this affect a system design?

  8. What is the difference between an EXE and a DLL?

  9. What is a PID? How is it useful when troubleshooting a system?

  10. How many processes can listen on a single TCP/IP port?

  11. What is the GAC? What problem does it solve?

  12. What is Reflection?

  13. What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP?

  14. Are the type system represented by XmlSchema and the CLS isomorphic?

  15. Conceptually, what is the difference between early-binding and late-binding?

  16. What is the difference between Runtime, and Compile time?

  17. How many classes could you put in a dll?

  18. Is using Assembly.Load Static or Dynamic?

  19. When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?

  20. What is an Asssembly Qualified Name? Is it a filename? How is it different?

  21. Is this valid? Assembly.Load("foo.dll");

  22. How is a strongly-named assembly different from one that isn’t strongly-named?

  23. Can DateTimes be null?

  24. What is the JIT? What is NGEN? What are limitations and benefits of each?

  25. How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?

  26. What does this useful command line do? tasklist /m "mscor*"

  27. What is the difference between in-proc and out-of-proc?

  28. What technology enables out-of-proc communication in .NET?

  29. When you’re running a component within ASP.NET, what process is it running within on

  30. Windows XP? Windows 2000? Windows 2003?

  31. What’s wrong with a line like this? DateTime.Parse(myString);

  32. Explain the use of virtual, sealed, override, and abstract.

  33. Explain the importance and use of each component of this string: Foo.Bar,Version=2.0.205.0, Culture=neutral, PublicKeyToken=593777ae2d274679d

  34. What benefit do you get from using a Primary Interop Assembly (PIA)?

  35. By what mechanism does NUnit know what methods to test?

  36. What is the difference between: catch(Exception e){throw e;} and catch(Exception e){throw;}

  37. What is the difference between typeof(foo) and myFoo.GetType()?

  38. Explain what’s happening in the first constructor and how is this construct useful?

  39. What is this? Can this be used within a static method?

  40. What are PDBs? Where must they be located for debugging to work?

  41. What is cyclomatic complexity and why is it important?

  42. Write a standard lock() plus “double check” to create a critical section around a variable access.

  43. What is FullTrust? Do GAC’ed assemblies have FullTrust?

  44. What benefit does your code receive if you decorate it with attributes demanding specific Security permissions?

  45. What does this do? gacutil /l find /i "Corillian"

  46. What does this do? sn -t foo.dll

  47. What ports must be open for DCOM over a firewall? What is the purpose of Port 135?

  48. Contrast OOP and SOA. What are tenets of each?

  49. How does the XmlSerializer work? What ACL permissions does a process using it require?

  50. Why is catch(Exception) almost always a bad idea?

  51. What is the difference between Debug.Write and Trace.Write? When should each be used?

  52. What is the difference between a Debug and Release build? Is there a significant speed difference? Why or why not?

  53. Does JITting occur per-assembly or per-method? How does this affect the working set Contrast the use of an abstract base class against an interface?

  54. What is the difference between a.Equals(b) and a == b?

  55. In the context of a comparison, what is object identity versus object equivalence?

  56. How would one do a deep copy in .NET?

  57. What is boxing and unboxing, with examples, what is it used for?

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

  59. What is the significance of the "PropertySpecified" pattern used by the XmlSerializer

  60. What problem does it attempt to solve?

  61. Why are out parameters a bad idea in .NET? Are they?

  62. Can attributes be placed on specific parameters to a method? Why is this useful?

  63. How does assembly versioning in .NET prevent DLL Hell?

  64. What compiler switch creates an xml file from the xml comments in the files in an assembly?

  65. What is a satellite Assembly?

  66. How does assembly versioning in .NET prevent DLL Hell?

  67. In the NUnit test framework, which attribute must adorn a test class in order for it to be picked up by the NUnit GUI?

C#:



  1. The C# keyword ‘int’ maps to which .NET type?

  2. How do you escape a backslash in C#?

  3. How do you declare a two dimentional array in C#?

  4. If a method is marked as protected internal who can access it?

  5. Which “Gang of Four” design pattern is shown below? public class A { private A instance; private A() { } public static A Instance { get { if ( A == null ) A = new A(); return instance; } }}

  6. What is the default accessibility for a class?

  7. What is the default accessibility for members of an interface?

  8. What is the default accessibility for members of a struct?

  9. Can the members of an interface be private?

  10. Methods must declare a return type, what is the keyword used when nothing is returned from the method?

  11. Class methods to should be marked with what keyword?

  12. A class can have many mains, how does this work?

  13. Does an object need to be made to run main?

  14. What are the two return types for main?

  15. What is a reference parameter?

  16. What is an out parameter?

  17. What is a constructor?

  18. If I have a constructor with a parameter, do I need to explicitly create a default constructor?

  19. What is a destructor?

  20. Can you use access modifiers with destructors?

  21. What is an event?

  22. Are events synchronous of asynchronous?

  23. Events use a publisher/subscriber model. What is that?

  24. Can a subscriber subscribe to more than one publisher?

  25. What is a value type and a reference type?

  26. Name 5 built in types.

No comments: