Senior Developers/Architects (Part II)
- 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?
If the functionality you are creating will be useful across a wide range of disparate objects, use an interface. Abstract classes should be used primarily for objects that are closely related, whereas interfaces are best suited for providing common functionality to unrelated classes.
If you want to provide common, implemented functionality among all implementations of your component, use an abstract class. Abstract classes allow you to partially implement your class, whereas interfaces contain no implementation for any members.
For more info: http://sendhil.spaces.live.com/blog/cns!30862CF919BD131A!576.entry
- What is the difference between a.Equals(b) and a == b?
The default implemenation for Equals on object checks for references or identity.
There is no default implementation for ‘==’ on value types.
The default implementation for ‘==’ on reference types checks for idenity or memory references
- In the context of a comparison, what is object identity versus object equivalence?
Equivalence: two instances are considered equal if their values represented by them are equal, they can point to different memory locations. For example:
“Person p1 = new Person();p1.age = 25;Person p2 = new Person();p2.age = 25;”
Identity comparison of p1 and p2 should return false whereas equivalence should return true.
- How would one do a deep copy in .NET?
ICloneable is another.
- Explain current thinking around IClonable.
- What is boxing?
For more info: http://sendhil.spaces.live.com/blog/cns!30862CF919BD131A!349.entry
- Is string a value type or a reference type?
- What is the significance of the "PropertySpecified" pattern used by the XmlSerializer? What problem does it attempt to solve?
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlSerializationXmlSerializerClassTopic.asp
- Why are out parameters a bad idea in .NET? Are they?
http://msdn.microsoft.com/vcsharp/programming/language/ask/refandout/default.aspx
.Net doesn’t verify that an out parameter is set inside a method that uses an out parameter before an exception is called. This mean that you may use an uninitialized parameter without the compiler catching on to this. Use ref parameters instead.
- Can attributes be placed on specific parameters to a method? Why is this useful?
No comments:
Post a Comment