?? product.cs
字號:
using System;
namespace BasicBridge
{
/// <summary>
/// Summary description for Product.
/// </summary>
public class Product : IComparable {
private string quantity;
private string name;
//-----
public Product(string line) {
int i = line.IndexOf ("--");
name =line.Substring (0, i).Trim ();
quantity = line.Substring (i+2).Trim ();
}
//-----
public string getQuantity() {
return quantity;
}
//-----
public string getName() {
return name;
}
//-----
public int CompareTo(object p) {
Product prod =(Product) p;
return name.CompareTo (prod.getName ());
}
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -