# Tuesday, June 02, 2009
Have you ever asked yourself, why C# string type works somehow different than other reference types?
  • First, when you declare them, you don't have to use a reserved word, which is used for reference type initialization - "new". You can also easily "overwrite"* them.
  • Second, when it is passed as a parameter to method, it does not reflect possible changes of this parameter inside a method (as reference types would normally do).
So what this animal really is? To explain string behaviour in deep, you have to know all about:
- immutability
- value type vs. reference types
- parameter passing
- C# reserved word "implicit"
- ...

All these interesting topic I will cover in the following days.

*As straight forwards as it may seems, we will see this is not really true.

posted on Tuesday, June 02, 2009 1:09:08 PM (Central European Daylight Time, UTC+02:00)  #    Comments [0] Trackback
Related posts:
C# Regions - Regionerate
Countdown app for DevDays
Simple XML Validation with .NET 3.5
Comments are closed.