C#???(static)
???????????? ???????[ 2013/7/23 11:32:19 ] ????????
?????????????????
????(1) ?????????Ρ??????ε????????
????(2) ???static???????????????????η??????????????????? ????е??
????(3) ??????????????????ó????????????????Σ???д??? ?????????????????κξ??????????????????? .
????(4) ???????????????е???????????????á?
????(5) ??????а????????????е? Main ?????????????????? ????????? Main ????????С??κδ??г????趨???????Σ???????и?????????????????????????????????Щ?????趨?
????(6) ?????б?д???????????????????а??????г????趨??????Σ?????????????????????????????????
????(7) ????????????????????????????檔????????б?????? ??????????????????????????????????
????MSDN???????????????? ??????????????????κξ???????????????н????????ε??????????????????????????????κξ?????????????????t?????????? ????????????????????
????(1)?????????????з??????η??????в?????
????(2)????????????????????κξ?????????????????t??????
????(3)?????????????
????(4)????????t??????????
????(5)??????У???????????????о??????????
????(6)????????????????????????????????????????????????????????????д??? (7)???????????????й????????????????????????ù???????????? LoadLibrary ??????
????????????????????????貼????????????????????????????????????????????????κζ???????????????????????????????????Щ??????????????????仯????????????????????????????????????????t????
?????????
?????????????? static??????????????????????????? new ??????????????????????????????????????????????????? .NET.Framework ???????????п? (CLR) ???????? ??t??????????????????????????????????磬??????鯔?????????????????????е???????????????????????????????? ??t????????????Щ??????
????????????????????£?
?????????????????????
???????????????????
???????????????
?????????????????????????
?????????????????????????????????????й???????????????????й????????????????? ??t????????????????????????м?????????????????????????????????????????????????????
?????????????????????????С?????????? Object ????κ????м?С????????????????????????????????????о??????????
?????????t????
????????????? CompanyInfo ???????????????й??????????????????з?????
class CompanyInfo
{
public string GetCompanyName() { return "CompanyName"; }
public string GetCompanyAddress() { return "CompanyAddress";
}
//...
}
???????????Щ??????????????????????????????????????????????????????????????????????
static class CompanyInfo
{
public static string GetCompanyName() { return "CompanyName"; }
public static string GetCompanyAddress() { return "CompanyAddress";
}
//...
}
??????
???·???
??????????????????
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