Home
Training
Links
Downloads
Contact
Subscribe

C# and .NET Questions

C# Language

1. What is a class?
2. What members can a class contain?
3. What is a struct?
4. What members can a struct contain?
5. What is a interface?
6. What members can a interface contain?
7. Where are classes allocated?
8. Where are structs allocated?
9. What is an enum?
10. What is an enum's default underlying type?
11. What is the difference between a property and a method?
12. What is a field?
13. What modifier is used to specify a variable argument list?
14. What parameter types are used to contain the variable argument list?
15. What is the difference between the 'ref' and 'out' parameter modifiers?
16. What is the reserved word 'this' used for?
17. What is the reserved word 'base' used for?
18. What is the static modifier used for?
19. When creating an instance of a type, does the 'new' operator imply dynamic memory allocation?
20. Describe the semantics of 'checked' and the 'unchecked' operators?
21. Describe the difference between static and instance class members?
22. Does C# support single or multiple inheritance?
23. What is the syntax for a static cast?
24. Describe the 'is' operator?
25. Describe the 'as' operator?
26. What is an access modifier used for?
27. Describe all access modifiers?
28. What is the default access modifier for a class?
29. What is the default access modifier for a class' members?
30. What is a nested class. Give an example of a good usage?
31. How many bytes is a C# char?
32. How many bytes is a C# int?
33. How many bytes is a C# long?
34. What is a virtual method?
35. What is the difference between a virtual and abstract method?
36. What does the override modifier provide?
37. What does it mean to seal a class?
38. What does it mean to seal a method?
39. What is a static constructor. When does it get invoked?
40. What is the difference between const and readonly?
41. How can you call one constructor from another constructor within the same type?
42. How do you initialize a base class that requires constructor parameters?
43. How do you instantiate a reference type. How do you instantiate a value type?
44. What is the difference between value and reference types?
45. How would you implement a reference type?
46. How would you implement a value type?
47. What is the implicit base class that all types derive from?
48. Name the methods of System.Object and describe their usage?
49. What is the difference between overloading and overriding?
50. How do you implement operator overloading?
51. How do you implement a conversion operator?
52. How do you allow name hiding?
53. Describe two ways to use 'using'?
54. What is explicit interface implementation?
55. What is an indexer?
56. How can you make a reference type act like a value type?
57. Does 'switch' allow fall through semantics like C and C++?

.NET Specification

1. What is the CTS, CLS?
2. What is the CLR?
3. What is CIL?
4. What are the three fundamental entities of the CTS?
5. Describe managed and unmanaged code?

.NET General

1. What is an application domain?
2. What does a JIT compiler provide and describe how it works?
3. What is a module. How is it different than an assembly? How do you create a module?
4. What is an assembly and describe the components of an assembly?
5. What is the GAC?
6. Describe delay siging. What is a good usage?
7. Give pro/cons of signing an assembly?
8. What is garbage collection?
9. Why should we understand how garbage works?
10. Describe the current garbage collection implementation?
11. What is the IDisposable interface used for?
12. Describing a scenario that implements this interface?
13. Describe a correct implementation of IDisposable?
14. What is a delegate?
15. Describe how a delegate works?
16. What is an event. Describe the differences between an event and delegate?
17. What is boxing. Describe how and when it occurs?

.NET Framework: Exceptions

1. How are exceptions handled in code?
2. How are they thrown?
3. Describe the semantics of a finally block?
4. When should exceptions be thrown?
5. When should you implement your own exception class?
6. Describe your exception class implementation?
7. What is the difference between managed and unmanaged exceptions?
8. Describe the functionality of the System.Exception class?
9. How can you catch unmanaged exceptions in C#?
10. What is an attribute?

.NET Framework: Serialization

1. Describe serialization support in .NET?
2. What serialization formatters are available?
3. Can any class by default be serialize? If not, how do you serialize a class?
4. How can you customize serialization?
5. Name pro and cons of serialization?

.NET Framework: Arrays

1. What are fixed arrays?
2. What are jagged arrays?
3. Describe how you create an array?
4. Describe how you create and initialize an array?
5. What is the lower bound of a C# array?
6. What properties does an array provide?
7. What are the sorting requirements for Array.Sort?
8. What interface should be implemented to provide custom type sorting?
9. What interface is available for providing alternative sort comparisons for a custom type?

.NET Framework: Collections

1. What data structures are available in .NET. What namespaces are they in?
2. Describe some of these data structures and how you choose one over another?
3. Name pros and cons for these data structures?
4. Describe the support IEnumerable and IEnumerator provides?

.NET Framework: Configuration Files

1. What are configation files?
2. Describe a basic format and elements of a configuration file?
3. What API provides access to the configuration file?
4. What is an application, assembly and machine configuration file. What is contained in them?

.NET Framework: Asynchronous Programming

1. How do you create an async delegate?
2. How do you manage async delegates?
3. What are some of the threading options available in .NET?
4. What is the thread pool?
5. Describe a thread pool use case?
6. How do you create a thread?
7. What is the required delegate type when creating a thread?
8. Since a thread uses a delegate, can you use a list of your delegate targets?
9. How do you abort a thread?
10. Describe the semantics of ThreadAbortException.
11. Name the functionality provided by the thread class?
12. What is a WaitHandle?
13. Describe the differences between an AutoResetEvent and a ManualResetEvent?
14. What does the C# lock statement provide?
15. How would you synchronize an ICollection implementation?
16. What is the difference between the Monitor class and a Mutex?
17. What functionality does Thread.Join provide?
18. What is a background thread. What is a foreground thread. Describe how the CLR handles each type?
19. Describe the Interlocked class. When is it useful?

.NET Framework: Xml

1. What class implements the XML dom and SAX parser?
2. What classes provide Xml parsing support?
3. What class provides Xml data validation parsing?
4. What classes implements the Xml serialization (What is the difference between this and other serialization formatters)?

.NET Framework: Interoperability

1. Describe how COM components can be accessed from C#?
2. How do you access native C dlls?
3. How do you implement invoking a native C method?
4. What class supports retrieving a Win32 error after invoking a native Win32 API C function?
5. What optional attribute parameter must be set to ensure the Win32 error is accurate before invoking a native C function?
6. What major functionality does the Marshal class provide?
7. In .NET when does a COM object go out of scope?
8. Can you force a COM object out of scope? If so, how?
9. What exceptions can be thrown when invoking COM methods from .NET?
10. Can you expose a .NET assembly as a COM component? If so, how? How do you implement COM registration for a .NET assembly?

.NET Framework: Text

1. Why and when do you need to encode text in .NET. How would you do it? What encoders are available?

.NET Framework: Security

1. Briefly describe code access security?
What's your C# IQ?

C# class schedule.

Software Juice .NET Profiling Presentation.

Subscribe to the Software Juice .NET email newletter.
 
© 2003-2007 Software Juice, Inc. All Rights Reserved.