ふらっとC#,C♯,C#(初心者用) Part26at TECHふらっとC#,C♯,C#(初心者用) Part26 - 暇つぶし2ch■コピペモード□スレを通常表示□オプションモード□このスレッドのURL■項目テキスト367:デフォルトの名無しさん 08/03/30 19:56:42 今更非ジェネリックは無いわ 368:デフォルトの名無しさん 08/03/30 20:18:48 こうだろ class Anime { Dictionary<string,int> titles; TitlesIndexer indexer; public Anime() { titles = new Dictionary<string,int>(); indexer = new TitlesIndexer(titles); } public TitlesIndexer Titles{ get{ return indexer; } } public class TitlesIndexer { Dictionary<int,string> titles; public TitlesIndexer(Dictionary<int,string> titles) { this.titles = titles; } public string this[int index]{ get{ return titles[index]} } } } } 369:デフォルトの名無しさん 08/03/30 20:21:36 358 じゃないですが、プロキシオブジェクトと聞いて・・・ 以前からある System.Collections.ArrayList.ReadOnly や System.Collections.ArrayList.Synchronized に対応する ジェネリックス版は無いのでしょうか? 見つからなくてとりあえず自作してしまっているので、あれば交換しておきたい所。 次ページ最新レス表示レスジャンプ類似スレ一覧スレッドの検索話題のニュースおまかせリストオプションしおりを挟むスレッドに書込スレッドの一覧暇つぶし2ch