• 大小: 165KB
    文件类型: .zip
    金币: 2
    下载: 1 次
    发布日期: 2021-06-17
  • 语言: C#
  • 标签: Head  First  C#  赛狗日  实验  

资源简介

这个是拿Head First C#官网上实验的可执行文件示例用工具反编译出来的源代码,在看这本书可以参考下。

资源截图

代码片段和文件信息

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ADayattheRaces
{
    public class Bet
    {
        public int Amount;
        public Guy Bettor;
        public int Dog;

        public string GetDescritpion()
        {
            if (this.Amount > 0)
            {
                return string.Concat(new object[] { this.Bettor.Name “ bets “ this.Amount “ on dog #“ this.Dog });
            }
            return (this.Bettor.Name + “ hasn‘t placed a bet.“);
        }

        public int PayOut(int winner)
        {
            if (this.Bettor.MyBet.Dog == winner)
            {
                return (2 * this.Bettor.MyBet.Amount);
            }
            return 0;
        }
    }
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2012-01-25 23:04  ADayattheRaces\
     目录           0  2012-01-26 09:08  ADayattheRaces\ADayattheRaces\
     文件        3795  2012-01-26 09:08  ADayattheRaces\ADayattheRaces\ADayattheRaces.csproj
     文件         143  2012-01-25 23:04  ADayattheRaces\ADayattheRaces\ADayattheRaces.csproj.user
     文件         780  2012-01-26 09:13  ADayattheRaces\ADayattheRaces\Bet.cs
     文件       17526  2012-01-26 09:11  ADayattheRaces\ADayattheRaces\Form1.Designer.cs
     文件        6136  2012-01-26 09:35  ADayattheRaces\ADayattheRaces\Form1.cs
     文件       50885  2012-01-26 09:11  ADayattheRaces\ADayattheRaces\Form1.resx
     文件        1230  2012-01-26 10:02  ADayattheRaces\ADayattheRaces\Greyhound.cs
     文件        1375  2012-01-26 09:13  ADayattheRaces\ADayattheRaces\Guy.cs
     文件         495  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Program.cs
     目录           0  2012-01-25 23:04  ADayattheRaces\ADayattheRaces\Properties\
     文件        1360  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Properties\AssemblyInfo.cs
     文件        2878  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Properties\Resources.Designer.cs
     文件        5612  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Properties\Resources.resx
     文件        1099  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Properties\Settings.Designer.cs
     文件         249  2012-01-25 23:01  ADayattheRaces\ADayattheRaces\Properties\Settings.settings
     目录           0  2012-01-25 23:04  ADayattheRaces\ADayattheRaces\bin\
     目录           0  2012-01-26 08:47  ADayattheRaces\ADayattheRaces\bin\Debug\
     文件       48640  2012-01-26 10:02  ADayattheRaces\ADayattheRaces\bin\Debug\ADayattheRaces.exe
     文件       40448  2012-01-26 10:02  ADayattheRaces\ADayattheRaces\bin\Debug\ADayattheRaces.pdb
     文件       11600  2012-01-26 10:03  ADayattheRaces\ADayattheRaces\bin\Debug\ADayattheRaces.vshost.exe
     文件         490  2010-03-17 22:39  ADayattheRaces\ADayattheRaces\bin\Debug\ADayattheRaces.vshost.exe.manifest
     目录           0  2012-01-26 10:04  ADayattheRaces\ADayattheRaces\bin\Release\
     目录           0  2012-01-25 23:04  ADayattheRaces\ADayattheRaces\obj\
     目录           0  2012-01-25 23:04  ADayattheRaces\ADayattheRaces\obj\x86\
     目录           0  2012-01-26 10:02  ADayattheRaces\ADayattheRaces\obj\x86\Debug\
     文件       30694  2012-01-26 09:12  ADayattheRaces\ADayattheRaces\obj\x86\Debug\ADayattheRaces.Form1.resources
     文件         180  2012-01-26 09:12  ADayattheRaces\ADayattheRaces\obj\x86\Debug\ADayattheRaces.Properties.Resources.resources
     文件        1054  2012-01-26 10:03  ADayattheRaces\ADayattheRaces\obj\x86\Debug\ADayattheRaces.csproj.FileListAbsolute.txt
     文件       48640  2012-01-26 10:02  ADayattheRaces\ADayattheRaces\obj\x86\Debug\ADayattheRaces.exe
............此处省略9个文件信息

评论

共有 条评论