資源簡介
C#實例方法的調用
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
namespace?_3._3
{
????class?sampleIndex
????{
????????private?double[]?arr?=?new?double[5]?{?1?2?3?4?5?};
????????public?double?this[int?index]
????????{
????????????get
????????????{
????????????????if?(index?0?||?index?>=?5)
????????????????{
????????????????????return?0;
????????????????}
????????????????else
????????????????{
????????????????????return?arr[index];
????????????????}
????????????}
????????????set
????????????{
????????????????if?(index?>=?0?&&?index?<=?5)
????????????????{
????????????????????arr[index]?=?value;
????????????????}
????????????}
????????}
????}
????class?Program
????{
????????static?void?Main(string[]?args)
????????{
????????????sampleIndex?smpIndex?=?new?sampleIndex();
????????????smpIndex[3]?=?3.5;
????????????for?(int?i?=?0;?i?6;?i++)
????????????{
????????????????Console.WriteLine(“smpIndex[{0}]={1}“?i?smpIndex[
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????2429??2015-09-29?09:15??3.3\3.3\3.3.csproj
?????文件???????5632??2015-09-29?09:25??3.3\3.3\bin\Debug\3.3.exe
?????文件??????13824??2015-09-29?09:25??3.3\3.3\bin\Debug\3.3.pdb
?????文件??????11600??2015-09-29?09:25??3.3\3.3\bin\Debug\3.3.vshost.exe
?????文件????????192??2015-09-29?09:25??3.3\3.3\obj\x86\Debug\3.3.csproj.FileListAbsolute.txt
?????文件???????5632??2015-09-29?09:25??3.3\3.3\obj\x86\Debug\3.3.exe
?????文件??????13824??2015-09-29?09:25??3.3\3.3\obj\x86\Debug\3.3.pdb
?????文件???????5833??2015-09-29?09:25??3.3\3.3\obj\x86\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1078??2015-09-29?09:36??3.3\3.3\Program.cs
?????文件???????1338??2015-09-29?09:15??3.3\3.3\Properties\AssemblyInfo.cs
?????文件????????851??2015-09-29?09:15??3.3\3.3.sln
????..A..H.?????15872??2015-09-29?09:36??3.3\3.3.suo
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\obj\x86\Debug\TempPE
?????目錄??????????0??2015-09-29?09:25??3.3\3.3\obj\x86\Debug
?????目錄??????????0??2015-09-29?09:25??3.3\3.3\bin\Debug
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\bin\Release
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\obj\x86
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\bin
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\obj
?????目錄??????????0??2015-09-29?09:15??3.3\3.3\Properties
?????目錄??????????0??2015-09-29?09:15??3.3\3.3
?????目錄??????????0??2015-09-29?09:15??3.3
-----------?---------??----------?-----??----
????????????????78105????????????????????22
- 上一篇:AJAX不刷新批量傳圖
- 下一篇:C# 常用加密解密
評論
共有 條評論