全文预览

c#基础笔记(C#basicnotes)

上传者:火锅鸡 |  格式:pdf  |  页数:42 |  大小:2606KB

文档介绍
tic int Main ()\r(\rInt i ;\rNote how I is declared but / not in itia liz e d\rSomeFunction (out I ) ;\rConsole. WriteLine ( I ) ;\rReturn 0;.\rProperty: it is a method or a pair of methods, and they appear\rto be a field in the client code\rPrivate string foreName;\rPublic string ForeName\r(\rGet\r(\rReturn foreName;\r)\rSet\r{if (value. Length > 20)\rCode here to take error recovery / / action\r(eg. throw an / / exception)\rElse\rForeName = value;.\rAutomatically implemented attributes\rPublic string ForeName {get; set;}\rThere must be two access devices\rPublic string ForeName {get; private set;}// read-only

收藏

分享

举报
下载此文档