???C#??????????????
???????????? ???????[ 2015/9/7 10:56:44 ] ???????????????????
????????????
?????????(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??????????????????????????????????塣?????ò????????????????????????????????????????????????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11