- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 146字
- 2021-07-02 15:29:19
Entering the reference code
Now, I'll do my reference code. This code is mechanical. There's a lot of it, but it's mechanical. Remember, the big idea here is that IComparable is being implemented using the CompareTo method inside the Quad class, which means that now when we stick different shapes into a list of quads, we will be able to sort them in some fashion. So, now our names will be sorted. In our case, we'll be sorting them by name.
Now go to Default.aspx, and enter the Design view. Double-click on the Sort and Show button. This takes us into Default.aspx.cs. Delete the Page_Load block.
Next, between the set of curly braces under the line beginning with protected void Button1_Click..., the first thing we'll do is to put a Quad on the left-hand side and we'll call it sqr:
Quad sqr = new Square("Square", 4);
- Getting Started with Citrix XenApp? 7.6
- 自然語言處理實戰:預訓練模型應用及其產品化
- HoloLens Beginner's Guide
- 從程序員到架構師:大數據量、緩存、高并發、微服務、多團隊協同等核心場景實戰
- 跟小海龜學Python
- Mastering RStudio:Develop,Communicate,and Collaborate with R
- Apache Mahout Clustering Designs
- 單片機C語言程序設計實訓100例
- Create React App 2 Quick Start Guide
- Mastering AWS Security
- Python期貨量化交易實戰
- Photoshop智能手機APP界面設計
- SSH框架企業級應用實戰
- SEO教程:搜索引擎優化入門與進階(第3版)
- Python預測之美:數據分析與算法實戰(雙色)