????????????
?????????(immutable)?? ??????????????????????????????????????????θ???????????????
????var str="mushroomsir";
????str.Substring(0?? 6)
????c#?е?string????????Substring(0?? 6)???????????????????????????????????????????????????StringBuilder?????????????????StringBuilder?????
????var age=18;
???????洢?18?????????age?????????????????????????????
????age=2;
?????????????п??????2?????age??????????????18????????????int??c#???????????
????class Contact
????{
????public string Name { get;  set; }
????public string Address { get;  set; }
????public Contact(string contactName?? string contactAddress)
????{
????Name = contactName;
????Address = contactAddress;
????}
????}
????var mutable = new Contact("???"?? "?廩");
????mutable.Name = "???";
????mutable.Address = "????";
?????????????MutableContact?????mutable???????????????MutableContact?????????????????????????????????????(mutable)????
?????????????????????й??????????Щ?????????????A??????? Name = “???” ?????????????????п????????????????
????mutable.Name == "???";
????mutable.Address == "?廩";
?????????????????????????????????г??????????????????????????????????£?
????public class Contact2
????{
????public string Name { get; private set; }
????public string Address { get; private set; }
????private Contact2(string contactName?? string contactAddress)
????{
????Name = contactName;
????Address = contactAddress;
????}
????public static Contact2 CreateContact(string name?? string address)
????{
????return new Contact2(name?? address);
????}
????}
??????????????Contact2????????????????Name??Address??Ρ?Contact2??????????????????????????????????塣?????ò????????????????????????????????????????????????????????