Created
September 7, 2016 14:47
-
-
Save Krita3/28673a3bdfb2feb2f8887680510e0e36 to your computer and use it in GitHub Desktop.
Compositeパターン アイテムとアイテムディレクトリの抽象クラス
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class Entry | |
{ | |
protected string name = ""; | |
public string Name | |
{ | |
get | |
{ | |
return this.name; | |
} | |
} | |
// 接頭辞をつけて一覧をログに表示する | |
public abstract void PrintListLog(string prefix); | |
// 一覧をログに表示する | |
public void PrintListLog() | |
{ | |
PrintListLog(""); | |
} | |
public override string ToString() | |
{ | |
return this.Name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment