Saturday, May 10, 2008

Important Points to Note

1. Every class is derived from System.Object
2. Immutable - Data value may not be changed. variable value may be changed, but the original immutable data is discareded and new data value is created in memory.
3. Finally block will be executed even though the exception occurs.
4. "Sealed" keyword prevents your class from being inherited.
5. You can make class public but method as sealed will prevent method from being overridden
6. "Abstract Class" - Class cannot be instantiated. So it must be Inherited
7. Multiple interfaces can be implemented, but multiple classes cannot be inherited
8. Inside interface access modifiers cannot eb specified as all methods has to be implemented by class. So they all must be public and hence they are public by default.
9. Difference between Interface and Abstract class.
Interface Abstract
a. all methods are abstract Some methods can be concrete
b. there is no implementation implementations can be present
c. no accessibility modifiers allowed allowed
10. "Virtual" keyword says method or property can be overridden
11. Delegate object encapsulates a reference to a method. mainly used in events.
12. Debug class can be used for Debug builds, Trace can be used for both Debug and Release builds.
13. DLL Hell - Assembly versioning allows applications to specify not only lirary it needs to run, but also the version of the assembly
14. Floowing are different ways of deplyong assembly
a. MSI Installer
b. CAB Archive
c. XCOPY Deployment
15. When we write Multi Lingual applications and want to distribute core application seperately from the localized modules, the localized assemblies that modify the core application are called
16. Assembly is the smallest unit of execution in .NET
17. System.Globalization and Sstem.resources namespaces are neccessary to create localized applications
18. You should not call Garbage collector. However, you caould call garbeg collector when you are done using a large object to force the garbage collector to dispose of those very large objects from memory. But still this is usually not a good practice.
19. Using Boxing Value Type can be converted into Reference Type
20. Since Boxing converts value type to reference type object will be stored in Heap
UnBoxing converts reference type to value type so, object will be stored in Stack

No comments: